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

New Post: Showing last editor and last changeDate

$
0
0
Yes. Create a new XSLT function.

In the function calls tab, go to source and add:
<functions>
    <f:function xmlns:f="http://www.composite.net/ns/function/1.0" name="Composite.Data.Types.IPage.GetIPageXml" localname="GetIPageXml">
        <f:param name="PropertyNames">
            <f:paramelement value="ChangedBy" />
            <f:paramelement value="ChangeDate" />
        </f:param>
        <f:param name="Filter">
            <f:function name="Composite.Data.Types.IPage.DataReferenceFilter">
                <f:param name="DataReference">
                    <f:function name="Composite.Data.Types.IPage.GetDataReference">
                        <f:param name="KeyValue">
                            <f:function name="Composite.Pages.GetPageId" />
                        </f:param>
                    </f:function>
                </f:param>
            </f:function>
        </f:param>
    </f:function>
</functions>
In the template tab, add:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:in="http://www.composite.net/ns/transformation/input/1.0" xmlns:lang="http://www.composite.net/ns/localization/1.0" xmlns:f="http://www.composite.net/ns/function/1.0" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xsl in lang f">
    <xsl:template match="/">
        <html>
            <head />
            <body>
                <p>
                    Value of ChangedBy:<br />
                    <xsl:value-of select="/in:inputs/in:result[@name='GetIPageXml']/IPage/@ChangedBy" />
                </p>
                <p>
                    Value of ChangeDate:<br />
                    <xsl:value-of select="/in:inputs/in:result[@name='GetIPageXml']/IPage/@ChangeDate" />
                </p>
            </body>
        </html>
    </xsl:template>
</xsl:stylesheet>
Save the function and then insert it onto a page.

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>