|
|
Posted by petersprc on 11/01/06 23:46
Hi,
You can do this probably with include:
$smarty->assign('css', 'my.css');
{include file="$css"}
Cookie Jar wrote:
> I have a situation where I am trying to abstract away not only the
> organization of the presentation (via TPL files) but also some of the
> finer formatting features (via CSS).
>
> So, for a particular request, I want to be able to select a specific
> TPL file to render (easy enough), but I also want to indicate a
> specific CSS file to use with the selected TPL.
>
> Can this assignment be done dynamically, i.e. at runtime? I am hoping
> I can pass the name of the CSS file to the TPL file, as any other
> dynamically assigned tag, but I am unsure whether the TPL file would be
> compiled before or after the CSS file would be assigned.
Navigation:
[Reply to this message]
|