(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.
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
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)
(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?
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
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.
Thanks Scott and Daniel
Both of your solutions worked, so now I can see the news overview on all the pages.
is working on a reply...