Copied to clipboard

Flag this post as spam?

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


  • Djan Blom 99 posts 161 karma points
    Mar 18, 2011 @ 08:51
    Djan Blom
    0

    Xslt footerText in 4.0.2 ?

    Hi,

    I wanted to have a text-string-field on the homepage - so that when I change it here, it changes on all pages.

    So I followed this thread;

    http://our.umbraco.org/forum/templating/templates-and-document-types/14448-Editable-Footer-Edit-in-one-tab-for-all-pages

    It works in a 4.6.2 solution, but not with an older version like 4.0.2..

    Can someone tell me what to change, to make it work? I suppose its got something to do with the syntax..

    My Xslt-file:

    <xsl:template match="/">

    <xsl:variable name="footerNode" select="umbraco.library:GetXmlNodeById(1079)"/>

    <xsl:value-of select="$footerNode/footerText"/>

    </xsl:template>

    My macro:

    <div id="page_footer">
    |<umbraco:Macro Alias="footerText" runat="server"></umbraco:Macro>|
    </div>

    The solution runs here:

    http://master7.v5.baseshop.dk/forside.aspx

     

    Thanks,

    Djan

  • Kim Andersen 1447 posts 2197 karma points MVP
    Mar 18, 2011 @ 09:37
    Kim Andersen
    0

    Hi Djan

    Try changing this line:

    <xsl:value-of select="$footerNode/footerText"/>

    to this:

    <xsl:value-of select="$footerNode/data[@alias='footerText']"/>

    /Kim A

  • Djan Blom 99 posts 161 karma points
    Mar 18, 2011 @ 09:46
    Djan Blom
    0

    Did the trick, thank you very much Kim :)

  • Kim Andersen 1447 posts 2197 karma points MVP
    Mar 18, 2011 @ 09:54
    Kim Andersen
    0

    No problem Djan.

    The reason why it's written different is that the XML schema has changed in the newer versions of Umbraco.

    /Kim A

  • Djan Blom 99 posts 161 karma points
    Mar 18, 2011 @ 10:30
    Djan Blom
    0

    Yeah, problem was that Im not the best with xslt yet.. But practice makes Masterpages.. ^^

  • 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.

    Continue discussion

Please Sign in or register to post replies