Copied to clipboard

Flag this post as spam?

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


  • Mohammad Azeem 31 posts 74 karma points
    Jul 10, 2012 @ 16:54
    Mohammad Azeem
    0

    Macro Field for Slider Is not Displaying in Content Pages..

    Hy All!
    am newbie in Umbraco.. and facing my issues
    i Created a XSLT for Slider. macro for this xslt placed in Master Template..
    but it is not showing in Content Pages...
    waiting for your reply...
    Thanks in advace..
    My XSLT is following here

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:tagsLib="urn:tagsLib" xmlns:BlogLibrary="urn:BlogLibrary"
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets tagsLib BlogLibrary ">


    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">

    <!-- start writing XSLT -->
      <xsl:variable name="sliderNode" select="$currentPage/parent::*/child::*[@level=1]"/>

     <div>
        <div id="imageSlider">
          <xsl:for-each select="$sliderNode/child::umediaSlider">

                     <img src="{umbracoFile}" width="100%" height="250" />

          </xsl:for-each>
       </div>
    </div>
    </xsl:template>

    </xsl:stylesheet>

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jul 11, 2012 @ 04:26
    Tom Fulton
    0

    Hi,

    Might need a little more info, but based on your other thread I'm guessing the Slider folder is directly under the Content root, in which case I would probably adjust your XPath to something like this, replacing the doctype alias:

    <xsl:variable name="sliderNode" select="$currentPage/ancestor::root/DocTypeAliasOfYourSlidersFolder [@isDoc]"/>

    If not, can you provide a bit more info on what isn't working?  Is the macro rendering on your pages, it's just not showing any content?   Can you show us your content structure?

    Thanks,
    Tom 

  • Mohammad Azeem 31 posts 74 karma points
    Jul 11, 2012 @ 09:04
    Mohammad Azeem
    0

    Hi Tom!

    Thanks...

    would you like to give me some links . where can i study XSLT tutorial for Umbraco...

    Cheers Azeem Ravi

    SkypeName: azeemravi361

     

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Jul 11, 2012 @ 10:25
    Dennis Aaen
    1

    Hi Azeem

    I hope some of these resources help you to study XSLT in Umbraco CMS

    http://our.umbraco.org/wiki/reference/xslt

    One of the pages on the wiki for xslt shows the difference between the old and new XML schema

    http://our.umbraco.org/wiki/reference/xslt/45-xml-schema/xslt-examples-updated-to-new-schema

    And other resource for understanding xslt for Umbraco could be:

    http://umbraco.com/help-and-support/video-tutorials/introduction-to-umbraco/sitebuilder-introduction/creating-your-first-xslt-macro/TVPlayer

    I hope these resources will help you continue to study XSLT

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft