Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
John Nguyen
Web Structure and Template
July 31, 2012 9:29 AM
Answer

John Nguyen

Rank: New Member

Posts: 21

Join Date: July 16, 2012

Recent Posts

Hello.
Current I have a web content structure like so,
 1<root>
 2  <dynamic-element name='content' type='text_area' index-type='' repeatable='false'>
 3  <meta-data>
 4            <entry name="displayAsTooltip"><![CDATA[false]]></entry>
 5            <entry name="required"><![CDATA[false]]></entry>
 6            <entry name="instructions"><![CDATA[]]></entry>
 7            <entry name="label"><![CDATA[content]]></entry>
 8            <entry name="predefinedValue"><![CDATA[]]></entry>
 9        </meta-data>
10</dynamic-element>
11  <dynamic-element name='mini-slideshow-excerpt' type='text_box' index-type='' repeatable='false'>
12  <meta-data>
13            <entry name="displayAsTooltip"><![CDATA[false]]></entry>
14            <entry name="required"><![CDATA[false]]></entry>
15            <entry name="instructions"><![CDATA[]]></entry>
16            <entry name="label"><![CDATA[Mini Slideshow Excerpt]]></entry>
17            <entry name="predefinedValue"><![CDATA[]]></entry>
18        </meta-data>
19
20    <dynamic-element name='mini-slideshow-image' type='image' index-type='' repeatable='false'>
21  <meta-data>
22                <entry name="displayAsTooltip"><![CDATA[false]]></entry>
23                <entry name="required"><![CDATA[false]]></entry>
24                <entry name="instructions"><![CDATA[]]></entry>
25                <entry name="label"><![CDATA[Mini Slideshow Image]]></entry>
26                <entry name="predefinedValue"><![CDATA[]]></entry>
27            </meta-data>
28  </dynamic-element>
29    <dynamic-element name='mini-slideshow-order' type='text' index-type='' repeatable='false'>
30  <meta-data>
31                <entry name="displayAsTooltip"><![CDATA[false]]></entry>
32                <entry name="required"><![CDATA[false]]></entry>
33                <entry name="instructions"><![CDATA[]]></entry>
34                <entry name="label"><![CDATA[mini-slideshow-order]]></entry>
35                <entry name="predefinedValue"><![CDATA[]]></entry>
36            </meta-data>
37</dynamic-element>
38  </dynamic-element>
39</root>

and the page template like so,
1<div>
2$mini-slideshow-excerpt.getData()
3#foreach($item in $mini-slideshow-excerpt.getChildren())
4$item.getData()
5#end
6<div>


How do I just target the mini-slideshow-image and not mini-slideshow-order? I just want the mini-slideshow-image data.


Thanks,
John
John Nguyen
RE: Web Structure and Template
July 31, 2012 2:43 PM
Answer

John Nguyen

Rank: New Member

Posts: 21

Join Date: July 16, 2012

Recent Posts

For the time being, I've pulled the option out so that its not nested anymore. And this I can call, so now its working.