Home › Forums › General XMetaL Discussion › Different stylesheet for ‘Tags On’ and ‘Normal’ view? › Reply To: Different stylesheet for ‘Tags On’ and ‘Normal’ view?
Reply to: Different stylesheet for ‘Tags On’ and ‘Normal’ view?January 3, 2012 at 6:18 pm
Yes, you can do this. It requires scripting.
There is no example available that demonstrates this exactly. Your code would run inside the event On_View_Change and would have an if…then check for the current ViewType, which would then contain code to load a particular CSS.
An example of switching the CSS manually (which could easily be adapted into an On_View_Change event macro) is included with the DocBook demo, which are the two items ending with “(DocBook)” in the Help > Samples menu. Once you have one of the samples opened you can select the menu item DocBook > Document Display > Use Stylesheet Example 1/2/3
The customization for this demo lives here: