Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

Creating related media from template

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


George.Harrison at gov

Sep 30, 2009, 9:02 AM

Post #1 of 2 (155 views)
Permalink
Creating related media from template

Hi,

I have a list of links that for user maintenance reasons I want to
convert to a list of related media.

But before I over task my brain by writing a template or script myself,
I thought I'd ask if anyone has done such a thing already.

If not, I'm thinking that the core steps would be:

Because the media are already stored in Bricolage,
Get the id of the media to be related
Call add_element to create a new container of type related_media
Save the new related_media element
Call set_related_media with the id of media to be related
Set the value of the link text field

Can someone tell me how far I am from the right path?

Thanks

gh


david at kineticode

Oct 1, 2009, 8:54 AM

Post #2 of 2 (142 views)
Permalink
Re: Creating related media from template [In reply to]

On Sep 30, 2009, at 9:02 AM, Harrison, George (STEM) wrote:

> Because the media are already stored in Bricolage,
> Get the id of the media to be related
> Call add_element to create a new container of type related_media
> Save the new related_media element
> Call set_related_media with the id of media to be related
> Set the value of the link text field
>
> Can someone tell me how far I am from the right path?

Sounds about right. Have a look at the thumbnail-generating template
[example](http://github.com/bricoleurs/templates/blob/master/thumbnail.mc
), which first generates a media document, but then associates it with
the original media document as related media.

Best,

David

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.