Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Insert code after variable

Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
K Town Mods
Smarty n00b

Joined: 01 Sep 2019
Posts: 1

PostPosted: Sun Sep 01, 2019 4:58 am    Post subject: Insert code after variable Reply with quote


i have a .tpl file with following content

{capture assign='contentDescription'}{lang}wcf.legalNotice.description{/lang}{/capture}

{include file='header'}

<section class="section">
   <h2 class="sectionTitle">{lang}wcf.legalNotice.general{/lang}</h2>
      {if $encodedEmailAddress}
         <dd><a href="mailto:{@$encodedEmailAddress}">{@$encodedEmailAddress}</a></dd>
   {event name='generalFields'}

   <section class="section">
      <h2 class="sectionTitle">{lang}wcf.legalNotice.additionalText{/lang}</h2>
      <div class="htmlContent">
      {event name='additionalTextFields'}

{event name='sections'}

{include file='footer'}

I cant change this file, but i can make a file, that put my code to that tpl file.

But the problem is, that my code from the other file,puts on the end of the tpl file, but i want to put it directly after the following content from above file:

{if $encodedEmailAddress}
         <dd><a href="mailto:{@$encodedEmailAddress}">{@$encodedEmailAddress}</a></dd>

I mean the

So the question is how to do that?

btw. sry for my bad english
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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