Copied to clipboard

Flag this post as spam?

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


  • Sierra Santiago 33 posts 53 karma points
    Jan 05, 2012 @ 16:54
    Sierra Santiago
    0

    Create Slider Macro?

    I have a slider placed at the top of my homepage that I need to re-tweak and I'm wondering about the best way to handle it. Okay, here we go:

    The slider at the top has editable content under the Slider tab, a header (Textstring) and information (Richtext Editor), because Admins need to be able to change what is displayed (Obviously). There is also a True/False check box for each slide except the first one (There are five total). Here is the basic set-up:

    Header 1
    Slide 1

    Header 2
    Show 2
    Slide 2

    Header 3
    Show 3
    Slide 3

    And so on til 5.

    What I need is a macro that will inject the proper HTML into the area where the slider is so that the first slide shows and any other slides that are checked 'Yes' (1) to show. If automatically showing the first slide is too much of a hastle, I can add a True/False check box to it as well. The HTML will be set up as such:

    <ul>
    <li class="class">
    <umbraco: item "header 1">
    <umbraco: item "slide 1">
    </li>

    <li class="class">
    <umbraco: item "header #">
    <umbraco: item "slide #">
    </li>

    <li class="class">
    <umbraco: item "header #">
    <umbraco: item "slide #">
    </li> 
    </ul>

    I know I can probably easily use an XSLT but I'm not familiar with the language and have been attempting to learn, however, I don't have a huge amount of time. On top of that, I don't know how to access the Alias of the properties for use. If anyone has something similar and could give me some hints and tips, that would be great. Or would using C# work as well? I know I could probably create a literal that can inject the HTML since I have done something similar with Javascript, but again, I don't know how to access the Alias'/use them for testing.

    Any ideas, comments, or suggestions would be amazing~ :) If I haven't explained things clearly, feel free to let me know and I will try to better explain. Thank you.

Please Sign in or register to post replies

Write your reply to:

Draft