Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lee 95 posts 115 karma points
    Dec 29, 2011 @ 12:28
    Lee
    0

    Creating a list in a template

    Hi

    I have created a template that holds a jquery image rotator and depending on what page you view displays a different list of images like the html displayed below.

    How can I create the code below using dynamic code... I'm thinking XSLT to create the list but how do I attribute it to a page?

     

    Many thanks

     

    <ul>
                                                    <li>
                                                        <a href="images/rotatorimages_wt/madness_arch2.jpg" title="architecture"><img src="images/rotatorimages_wt/madness_arch2.jpg"/></a>                     
                                                    </li>
                                                    <li>
                                                        <a href="images/rotatorimages_wt/triworks_abstract17.jpg" title="krazy kartoons"><img src="images/rotatorimages_wt/triworks_abstract17.jpg"/></a>
                                                    </li>
                                                    <li>
                                                        <a href="images/rotatorimages_wt/krazy-kartoons-robot-dj02.jpg" title="krazy kartoons"><img src="images/rotatorimages_wt/krazy-kartoons-robot-dj02.jpg"/></a>                             
                                                    </li>
                                                    <li>
                                                        <a href="images/rotatorimages_wt/card10.jpg" title="krazy kartoons"><img src="images/rotatorimages_wt/card10.jpg"/></a>                                                     
                                                    </li>
                                                    <li>
                                                        <a href="images/rotatorimages_wt/triworks_abstract26.jpg" title="krazy kartoons"><img src="images/rotatorimages_wt/triworks_abstract26.jpg"/></a>                                                                               
                                                    </li>
                                                    <li>
                                                        <a href="images/rotatorimages_wt/triworks_objects17.jpg" title="krazy kartoons"><img src="images/rotatorimages_wt/triworks_objects17.jpg"/></a>                                                                       
                                                    </li>
                                                    <li>
                                                        <a href="images/rotatorimages_wt/scottwills_building2.jpg" title="krazy kartoons"><img src="images/rotatorimages_wt/scottwills_building2.jpg"/></a>                                                                     
                                                    </li>    
                                                    <li>
                                                        <a href="images/rotatorimages_wt/moo10.jpg" title="krazy kartoons"><img src="images/rotatorimages_wt/moo10.jpg"/></a>                                                         
                                                    </li>    
                                                </ul>

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 29, 2011 @ 14:22
    Tom Fulton
    0

    Hi Lee,

    You could (and should!) do this using XSLT or Razor.  To attribute it to a page, you would create a Macro that wraps around the XSLT file, then you can insert that macro into your template in place of the static markup.

    I would also suggest using DAMP as your media picker since it allows you to select multiple images in a single datatype.  I would add that to your page, upload your images to the Media Library, and use an XSLT Macro to display them from the DAMP field.

    If you need help just let us know :)

    -Tom

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies