Copied to clipboard

Flag this post as spam?

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


  • Niels Kristiansen 166 posts 382 karma points
    Feb 04, 2009 @ 20:56
    Niels Kristiansen
    0

    (Solved) How can I make a macro & XSLT global?

    Hi,

    I have a question about placing a macro in the footer on all the pages created in the template?

    I try to make a newslist in the footer, but I can only get to work on the footer on the frontpage, not on all the other pages. It must have something to do with my XSLT code.

    [code]
    ]>

    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"
    exclude-result-prefixes="msxml umbraco.library">

















    [/code]

    What is it I'm doing wrong?

  • Daniel Lindstrom 454 posts 271 karma points
    Feb 05, 2009 @ 09:24
    Daniel Lindstrom
    0

    Dop you have NumberofItemsToDisplay specified on all pages? You use:


    If you want the same number of news items on all pages you should probably retrieve the value from $currentPage/ancestor-or-self::node[@level=1] instead

  • Scott Hugh Alexandar Petersen 349 posts 164 karma points
    Feb 05, 2009 @ 10:17
    Scott Hugh Alexandar Petersen
    0

    You can do it varios ways but one common way for getting a field recursively is like this:

    (this will give you the first value it encounters on its way up the hieraki, so if you put a NoNewsEvents field on one of your subpages it will pick that value up if it is not empty)


    Hope you can use it.

  • Niels Kristiansen 166 posts 382 karma points
    Feb 06, 2009 @ 14:46
    Niels Kristiansen
    0

    Thanks Scott and Daniel

    Both of your solutions worked, so now I can see the news overview on all the pages.

Please Sign in or register to post replies

Write your reply to:

Draft