Only allow logged-in users to download XML file from back-office
Hi,
I have an XSLT macro which generates a chunk of XML data. I've created an alternative template for the website homepage with an appropriate content-type to force this data to be downloaded as an XML file. It works fine but I'd like to protect this download so that only logged-in users (users not members!) can access it.
I've tried wrapping a conditional around the XML output in the XSLT file which checks:
umbraco.library:IsLoggedOn()
But this always returns false, so I'm assuming this checks members not users?
Only allow logged-in users to download XML file from back-office
Hi,
I have an XSLT macro which generates a chunk of XML data. I've created an alternative template for the website homepage with an appropriate content-type to force this data to be downloaded as an XML file. It works fine but I'd like to protect this download so that only logged-in users (users not members!) can access it.
I've tried wrapping a conditional around the XML output in the XSLT file which checks:
But this always returns false, so I'm assuming this checks members not users?
Can anyone suggest a way of doing this?
Thanks
Not sure in XSLT, but this works in Razor, also here's an article that may help if you're willing to write a custom XSLT extension
is working on a reply...