Hi all My first question. I am trying to get the blog umb Business Frontpage Blog.xslt to work on the master template so the list of blogs appears in footer of every page. The following code has it working on home page but stops working on internal pages.
<xsl:for-each select="$currentPage/umbBlog//umbBlogPost [@isDoc and string(umbracoNaviHide) != '1']">
Is there a way of getting the macro to work on all pages site wide?
umb Business Frontpage Blog.xslt
Hi all
My first question. I am trying to get the blog umb Business Frontpage Blog.xslt to work on the master template so the list of blogs appears in footer of every page. The following code has it working on home page but stops working on internal pages.
<xsl:for-each select="$currentPage/umbBlog//umbBlogPost [@isDoc and string(umbracoNaviHide) != '1']">
Is there a way of getting the macro to work on all pages site wide?
Thanks
Gavin
Hi Gavin!
It is because $currentPage is a dynamic node variable.
It always point to the node of the current page.
The reason why your script runs well on the home page is because your blog posts probably located at
homePage/umbBlog/umbBlogPost
thus when you are visiting an internal site, the above code tries to find your blog posts at
someIntenralPage/umbBlog/umbBlogPost - but can't find it....
Not the best, but it worked for me:
create a new variable, for example:
('1163' is the id of your homePage)
then use it like:
<xsl:for-each select="$node/umbBlog/umbBlogPost [@isDoc and string(umbracoNaviHide) != '1']">
Hope this helps! ;)
Istvan
Thanks Istvan. That worked perfectly!
Best wishes
Gavin
Hi Gavin,
I always create a $siteRoot variable for purposes like this, which points to the top node of the site (even works in multi site solutions):
Then I can use that later as the base for selections that aren't tied to the current page:
/Chriztian
is working on a reply...