List Info

Thread: Getting a sub-element (container) of a media asset




Getting a sub-element (container) of a media asset
user name
2008-02-08 13:47:54
I'm struggling with a little (seemingly obvious) challenge
today...

I have a template that iterates through related stories.
Each of these  
stories has a related media asset / element associated with
it. And  
each of those related media assets have a sub-element (a
container)  
that relates an other related media element (an alternate
version of  
the media asset) to the media asset. So:

Calling story
|--> Sub-element (related stories)
    |--> Related story
      |---> Related media
        |---> Alternate media (sub-element, not a related
media element)
          |---> Related media

However, when I try to access the elements of the related
media  
element (the first one), all I'm able to see is:

caption credit height width resolution compression
color_type

I'm not able to see the "Alternate media"
container  
(alt_media_container).

I'm using:

my $rel_story = $element->get_related_story;
my $elem = $rel_story->get_element;
my $rel_media = $elem->get_related_media;
my $rel_media->get_elements;

.... which retrieves the list above, but not the container
for  
"Alternate media." Ideally, I'd like to be able to
get to the  
container, and then use get_related_media to retrieve the
right media  
asset.

Any thoughts?

Phillip.

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth
http://www.community
bandwidth.ca




Re: Getting a sub-element (container) of a media asset
user name
2008-02-08 13:56:35
Scratch that. A utility template wasn't deployed. All
working a-ok now.



On 8-Feb-08, at 2:47 PM, Phillip Smith wrote:

>
> I'm struggling with a little (seemingly obvious)
challenge today...
>
> I have a template that iterates through related
stories. Each of  
> these stories has a related media asset / element
associated with  
> it. And each of those related media assets have a
sub-element (a  
> container) that relates an other related media element
(an alternate  
> version of the media asset) to the media asset. So:
>
> Calling story
> |--> Sub-element (related stories)
>   |--> Related story
>     |---> Related media
>       |---> Alternate media (sub-element, not a
related media element)
>         |---> Related media
>
> However, when I try to access the elements of the
related media  
> element (the first one), all I'm able to see is:
>
> caption credit height width resolution compression
color_type
>
> I'm not able to see the "Alternate media"
container  
> (alt_media_container).
>
> I'm using:
>
> my $rel_story = $element->get_related_story;
> my $elem = $rel_story->get_element;
> my $rel_media = $elem->get_related_media;
> my $rel_media->get_elements;
>
> .... which retrieves the list above, but not the
container for  
> "Alternate media." Ideally, I'd like to be
able to get to the  
> container, and then use get_related_media to retrieve
the right  
> media asset.
>
> Any thoughts?
>
> Phillip.
>
> --
> Phillip Smith,
> Simplifier of Technology
> Community Bandwidth
> http://www.community
bandwidth.ca
>
>
>

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth
http://www.community
bandwidth.ca




[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )