The way you can access any property of a particular page in xslt, is by using the $currentPage variable and the currentPage refernce to the page where you are standing i the content tree. This article about the currentPage, I think it be worth to read.
In this example we will loop over all the newsItems, and this reference to the documenttype alias. If you have to acess data in a for-each loop, you have to do it this way.
In the example I have made above you get the data out of newsHeading, so you have to have a field on the newsitem documenttype with the alias of newsHeading
Since you're new to Umbraco and perhaps XSLT I think you should have a look at these references, I think they can help you try to understand how Umbraco works. And of course, just keep asking questions here.
umbracoNaviHide is not working
hii,,,umbraconavihide property is not accessible in the xslt
hi,
how did you try to access to this property ?
i want to know that how to access any property of a particular page in xslt.
Hi Vandna,
The way you can access any property of a particular page in xslt, is by using the $currentPage variable and the currentPage refernce to the page where you are standing i the content tree. This article about the currentPage, I think it be worth to read.
http://our.umbraco.org/wiki/reference/xslt/understanding-currentpage
But the way you can access properties in XSLT is by using
So if you have a field on a documenttype with an alias of bodyText, the way you get the data out is by using this:
If you are in a for-each loop you will have to do it this way.
<xsl:for-each select="$currentPage/NewsItem"></xsl:for-each>
In this example we will loop over all the newsItems, and this reference to the documenttype alias. If you have to acess data in a for-each loop, you have to do it this way.
In the example I have made above you get the data out of newsHeading, so you have to have a field on the newsitem documenttype with the alias of newsHeading
The umbracoNaviHide documentation http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbraconavihide
Since you're new to Umbraco and perhaps XSLT I think you should have a look at these references, I think they can help you try to understand how Umbraco works. And of course, just keep asking questions here.
http://umbraco.com/help-and-support/video-tutorials/introduction-to-umbraco/sitebuilder-introduction/document-types
http://umbraco.com/help-and-support/video-tutorials/introduction-to-umbraco/sitebuilder-introduction/templates.aspx
http://umbraco.com/help-and-support/video-tutorials/introduction-to-umbraco/sitebuilder-introduction/stylesheets.aspx
http://umbraco.com/help-and-support/video-tutorials/introduction-to-umbraco/sitebuilder-introduction/what-are-macros.aspx
http://umbraco.com/help-and-support/video-tutorials/umbraco-fundamentals/xslt-in-umbraco-45.aspx
I hope these references can help you learing Umbraco and XSLT, and I hope this post makes sense.
/Dennis
k thankx Dennis
is working on a reply...