Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Using Cascade Style Sheet (CSS) how to?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Next_Gate
Smarty Rookie


Joined: 23 Apr 2003
Posts: 5

PostPosted: Wed Apr 23, 2003 1:34 am    Post subject: Using Cascade Style Sheet (CSS) how to? Reply with quote

Im tryng to include in my .tpl file a style.. but it doesnt work, if i include the style tag and make some styles i get a blank page!!...

this is what im tryin g to do, i imagine is for the {} but how cvan i do it?? thanks

Example
Code:

<html>
   <head>
      <style>
            .ex {bla bla bal}
      </style>
   </head>
<body>
BLA BLA
</body>
</html>
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Apr 23, 2003 1:57 am    Post subject: Reply with quote

When running your templates through Smarty, braces are detected as Smarty tags...

Thus in:
<style>
.ex {bla bla bal}
</style>

Smarty tries to interpret {bla bla bal} and dies.

There are several ways to deal with this. The easiest is probably to put your styles into a {literal} block:

<style>
{literal}
.ex {bla bla bal}
{/literal}
</style>

everything between {literal} ... {/literal} is ignored by Smarty.

Hope it helps.
Back to top
View user's profile Send private message
Next_Gate
Smarty Rookie


Joined: 23 Apr 2003
Posts: 5

PostPosted: Wed Apr 23, 2003 3:36 am    Post subject: Reply with quote

Cool!... ill try that and its good to know about those tags!...

But i found another way to deal qith it!.. oi dont know if its the best but i put all my classes in a .conf file and invoque it from the template.. Smile and it works fine!
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Apr 23, 2003 4:33 am    Post subject: Reply with quote

In config files, huh. I guess that would work--at least for css. I think when you want to include some javascript, though, the syntax will conflict with the syntax of the config file.
Back to top
View user's profile Send private message
Next_Gate
Smarty Rookie


Joined: 23 Apr 2003
Posts: 5

PostPosted: Wed Apr 23, 2003 4:49 am    Post subject: Reply with quote

well.. maybe!!.. if that happens you'll see another thread opened witht that problem!! jajajajajaj!!!!


Greets!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP