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

Smarty Overlays?

 
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 -> Feature Requests
View previous topic :: View next topic  
Author Message
jasonlustig
Smarty n00b


Joined: 10 Mar 2005
Posts: 4

PostPosted: Thu Mar 10, 2005 10:46 pm    Post subject: Smarty Overlays? Reply with quote

Is there any work being done to allow smarty to allow "overlays" or having a file that will tell smarty to insert code at a certain point in other templates? I am thinking along the lines of Mozilla XUL overlays or HTML overlays as detailed at http://disruptive-innovations.com/zoo/20040830/HTMLoverlays.html

Jason
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Mar 10, 2005 10:57 pm    Post subject: Reply with quote

As far as I can tell, using Smarty is irrelevant. Put your overlay tags in the templates just like you would a static HTML file. The overlay logic happens in the javascript/css after the browser gets the HTML, whether that is from Smarty or not.
Back to top
View user's profile Send private message Visit poster's website
jasonlustig
Smarty n00b


Joined: 10 Mar 2005
Posts: 4

PostPosted: Thu Mar 10, 2005 11:12 pm    Post subject: Reply with quote

I don't mean to do it specifically like that, I mean that say I have a template that does this:

{foreach from=$var item=hello}
The item is: {$hello}
{/foreach}

And I have an outside template wants to change it to "The item is supposed to be", like this:

{foreach from=$var item=hello}
The item is supposed to be: {$hello}
{/foreach}

Then I could have an "overlay" template file that I could load into smarty that could change the "main" template and add/remove things to it.

Jason
Back to top
View user's profile Send private message
boots
Administrator


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

PostPosted: Thu Mar 10, 2005 11:27 pm    Post subject: Reply with quote

I wonder if he means if Smarty will incorporate the concept of overlays. It seems to me that Smarty is (currently) a replacement system without concept of document structure. Implementing tree-merging functionality seems outside of its (current) scope.

On the other-hand, it is an interesting idea; in my recent play time with Smarty I have been experimenting with ways of creating named sections within templates which could be targeted directly. Essentially I am looking at ways that a designer can annotate blocks within a template creating a modular design that would allow the compiler to break the template into distinct pieces which could be referenced (and loaded/processed/cached) separately. (eg: {include file="foo.tpl#bar_block}) Alas, I can't say more at this point.
Back to top
View user's profile Send private message
jasonlustig
Smarty n00b


Joined: 10 Mar 2005
Posts: 4

PostPosted: Fri Mar 11, 2005 4:05 am    Post subject: Reply with quote

The reason I'm looking for this functionality is that I am designing a software system and am trying to add functionality for "extensions" or mods. I have the whole system figured out, except that I need to give the extension developers the ability to change the frontend - i.e. the html that is produced by my smarty templates. The problem seems to me to be the fact that I can't just tell smarty to run code at the end of the template, I need to tell it to insert a template somewhere...
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 -> Feature Requests 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