XSLT FAQ

Can I print the last change date and author of a page?

I would like to print the last change date and the author in my page footer – can I retrieve this information using an XSLT function?

Answer:

Yes, the Composite C1 page object contains the properties “ChangeDate” and “ChangedBy” containing the date and time the page was last edited and the username of the person editing it.

The get this information as XML in an XSLT Function, execute these steps:

  1. On the Function Calls tab, add the function ‘Composite.Data.Types.IPage.GetIPageXML’
  2. Set ‘Selected fields’ uncheck all the fields you don’t need
  3. Set ‘Filter’ by executing a function call, launch the function designer
  4. Select the function ‘Composite.Data.Types.IPage.FieldProdicatesFilter’, click OK.
  5. Set ‘Id filter’ by executing a function call, launch the function designer
  6. Select the function ‘Composite.Utils.Predicates.GuidEquals’, click OK.
  7. Set ‘The value to compare with’ by executing a function call
  8. Select the function ‘Composite.Pages.GetPageId’, click OK.
  9. Click OK – 3 times – so you return to the Function Calls tab.
  10. Press preview to see the XML result