|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Next_Gate Smarty Rookie
Joined: 23 Apr 2003 Posts: 5
|
Posted: Wed Apr 23, 2003 1:34 am Post subject: Using Cascade Style Sheet (CSS) how to? |
|
|
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 |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Apr 23, 2003 1:57 am Post subject: |
|
|
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 |
|
Next_Gate Smarty Rookie
Joined: 23 Apr 2003 Posts: 5
|
Posted: Wed Apr 23, 2003 3:36 am Post subject: |
|
|
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.. and it works fine! |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Apr 23, 2003 4:33 am Post subject: |
|
|
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 |
|
Next_Gate Smarty Rookie
Joined: 23 Apr 2003 Posts: 5
|
Posted: Wed Apr 23, 2003 4:49 am Post subject: |
|
|
well.. maybe!!.. if that happens you'll see another thread opened witht that problem!! jajajajajaj!!!!
Greets! |
|
Back to top |
|
|
|
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
|