Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Retrieve Page Title inside XSLT function

$
0
0
The simplest way would be to emit the following from your xslt:
<rendering:page.title />
Composite C1 will pick up on this and replace it with the current page title. If the rendering namespace haven't been declared already add xmlns:rendering="http://www.composite.net/ns/rendering/1.0" to the above.

You could also add a call to Composite.Pages.SitemapXml on the Function Calls tab (see markup below for this call) and then use the xpath /in:inputs/in:result[@name='SitemapXml']/Page/@Title to get at the value.
<f:function name="Composite.Pages.SitemapXml" localname="SitemapXml">
        <f:param name="SitemapScope" value="Current" />
    </f:function>

Viewing all articles
Browse latest Browse all 2540

Trending Articles