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

CompileId for custom template resource

 
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
d2one
Smarty n00b


Joined: 01 Nov 2015
Posts: 2

PostPosted: Sun Nov 01, 2015 12:27 pm    Post subject: CompileId for custom template resource Reply with quote

I have a problem.
I have a custom template resource. Templates from resource can be with the same name, but with different content.

If i fetch template from resource, before fetch i make custom compile_id only for that templates.
But i can't make custom compile_id for included templates.

How can i set compile id to templates, which is compiled from my custom resources?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sun Nov 01, 2015 6:01 pm    Post subject: Re: CompileId for custom template resource Reply with quote

d2one wrote:
I have a problem.
I have a custom template resource. Templates from resource can be with the same name, but with different content.

Fix your backend.

Quote:
If i fetch template from resource, before fetch i make custom compile_id only for that templates.
But i can't make custom compile_id for included templates.

How can i set compile id to templates, which is compiled from my custom resources?


http://www.smarty.net/docs/en/language.function.include.tpl
Back to top
View user's profile Send private message
d2one
Smarty n00b


Joined: 01 Nov 2015
Posts: 2

PostPosted: Mon Nov 02, 2015 5:37 am    Post subject: Re: CompileId for custom template resource Reply with quote

Quote:
http://www.smarty.net/docs/en/language.function.include.tpl

i know, that i can do that like this:
{include file='template:project_layout_footer' compile_id={$tpl->getCustomCompileId()}}

But there is to much templates. And i don't wont fix all templates to include custom resource with compile_id param.

I think, i can override include, but i don't know where it is possible to do.
Or are their any ways to do this?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Mon Nov 02, 2015 7:06 am    Post subject: Reply with quote

If it wasn't obvious from the start (or even before you made your first post): THERE MUST BE NO INSTANCE, IN WHICH ONE TEMPLATE FILE COULD HAVE DIFFERENT CODE DEPENDING ON MOON PHASE OR OTHER INANE CONDITIONALS!
FIX! YOUR! TEMPLATES! SOURCE!
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