Reply New Topic
2014/4/8 21:35:04
#1
Offline
Just popping in

Remove theme css from a single page

I have a single page I want to display in an I frame but I need it to have it's own style, not the global style. Is there an easy way to do this?


2014/4/9 7:18:25
#2
Offline
Home away from home

Re: Remove theme css from a single page

Hi there,
try this:
<{if $smarty.server.REQUEST_URI=='/modules/XXXX'}> <link rel="stylesheet" href="<{xoImgUrl css/style.css}>" type="text/css" media="screen" charset="utf-8" /><{/if}>


in this example "/modules/XXXX" stands for your URI - the part after your domain. So you have to adjust it.

If you work with symlinks like index.php?fct=sitename* you can also use:
<{if $smarty.get.fct == 'sitename*'}><link rel="stylesheet" href="<{xoImgUrl css/style.css}>" type="text/css" media="screen" charset="utf-8" /><{/if}>


best Greetings,
Chris

_________________
Webdesign: http://netzstrand.de

2014/4/9 14:05:25
#3
Offline
Webmaster

Re: Remove theme css from a single page

Hi Chris,
that's nice Smarty template kung-fu there. I hadn't thought of it that way, very nice.

Thanks for sharing!

_________________

Me on Ohloh


2014/4/9 17:02:03
#4
Offline
Home away from home

Re: Remove theme css from a single page

;)

this works in both directions, of course. You can make it like
if (*smarty* != *sitename) than make *yourstandard.css*

_________________
Webdesign: http://netzstrand.de

2014/4/10 12:29:47
#5
Offline
Webmaster

Re: Remove theme css from a single page

I wonder if that would be useful in combination with symlinks, extending what you can do with symlinks that way

_________________

Me on Ohloh


Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.