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

transfer {counter} in {include} file

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


Joined: 08 Sep 2015
Posts: 2

PostPosted: Tue Sep 08, 2015 8:58 am    Post subject: transfer {counter} in {include} file Reply with quote

Hi

Is there a simple way transfer a {counter} as well as its value to an {include}-file and of course keep the nature/features of {counter} within the included file. What does the {counter}-code look like in the included file that receives the value and proceeds to increament?

current code
Code:
{include file="navigation_main/template/get.tpl" tree=$wrapper path=$path}


thx.
bearskin
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Sep 12, 2015 8:49 pm    Post subject: Reply with quote

The {counter} is global. Just use it in your sub template.
Back to top
View user's profile Send private message
bearskin
Smarty n00b


Joined: 08 Sep 2015
Posts: 2

PostPosted: Tue Sep 15, 2015 1:08 pm    Post subject: that was easy. Reply with quote

that is why I could not find any examples.

Thx.
Back to top
View user's profile Send private message
kmm37
Smarty n00b


Joined: 17 Sep 2015
Posts: 1
Location: http://beton-beton37.ru

PostPosted: Thu Sep 17, 2015 8:38 am    Post subject: Reply with quote

so yeah
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