Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » XML+XSL matters » Change XSLT based on role
Re: Change XSLT based on role [message #1354 is a reply to message #1353] Wed, 28 May 2008 18:43 Go to previous message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
If you want to change the 'look' of the output screens your first choice should really be use a different CSS file, as documented in http://www.tonymarston.net/php-mysql/cascading-style-sheets. html

If you really must switch to a different XSL file at runtme then this is possible. The contents of the screen structure file is read into a global variable called $structure at the start of each script, so its contents can be amended before being used to generate the HTML output. You will need to put code into each script similar to the following:
    if ($_SESSION['role_id'] == 'whatever') }
        $GLOBALS['structure']['xsl_file'] = 'whatever';
    }


 
Read Message
Read Message
Read Message
Read Message
Previous Topic: xsl transformation slow
Next Topic: Hacking into the XSLT process
Goto Forum:
  


Current Time: Thu Apr 25 06:15:23 EDT 2024

Total time taken to generate the page: 0.00893 seconds