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

Insert code after variable

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

Hey,

i have a .tpl file with following content

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

{include file='header'}

<section class="section">
   <h2 class="sectionTitle">{lang}wcf.legalNotice.general{/lang}</h2>
   
   <dl>
      {if LEGAL_NOTICE_ADDRESS}
         <dt>{lang}wcf.legalNotice.address{/lang}</dt>
         <dd>{@LEGAL_NOTICE_ADDRESS|language|newlineToBreak}</dd>
      {/if}
      
      {if $encodedEmailAddress}
         <dt>{lang}wcf.legalNotice.emailAddress{/lang}</dt>
         <dd><a href="mailto:{@$encodedEmailAddress}">{@$encodedEmailAddress}</a></dd>
      {/if}
      
      {if LEGAL_NOTICE_PHONE}
         <dt>{lang}wcf.legalNotice.phone{/lang}</dt>
         <dd>{LEGAL_NOTICE_PHONE}</dd>
      {/if}
      
      {if LEGAL_NOTICE_FAX}
         <dt>{lang}wcf.legalNotice.fax{/lang}</dt>
         <dd>{LEGAL_NOTICE_FAX}</dd>
      {/if}
      
      {if LEGAL_NOTICE_REPRESENTATIVE}
         <dt>{lang}wcf.legalNotice.representative{/lang}</dt>
         <dd>{LEGAL_NOTICE_REPRESENTATIVE}</dd>
      {/if}
      
      {if LEGAL_NOTICE_REGISTER}
         <dt>{lang}wcf.legalNotice.register{/lang}</dt>
         <dd>{LEGAL_NOTICE_REGISTER}</dd>
      {/if}
      
      {if LEGAL_NOTICE_VAT_ID}
         <dt>{lang}wcf.legalNotice.vatID{/lang}</dt>
         <dd>{LEGAL_NOTICE_VAT_ID}</dd>
      {/if}
   </dl>
   
   {event name='generalFields'}
</section>

{if LEGAL_NOTICE_ADDITIONAL_TEXT}
   <section class="section">
      <h2 class="sectionTitle">{lang}wcf.legalNotice.additionalText{/lang}</h2>
      
      <div class="htmlContent">
         {if LEGAL_NOTICE_ADDITIONAL_TEXT_ENABLE_HTML}{@LEGAL_NOTICE_ADDITIONAL_TEXT|language}{else}{@LEGAL_NOTICE_ADDITIONAL_TEXT|language|newlineToBreak}{/if}
      </div>
      
      {event name='additionalTextFields'}
   </section>
{/if}

{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:

Code:
{if $encodedEmailAddress}
         <dt>{lang}wcf.legalNotice.emailAddress{/lang}</dt>
         <dd><a href="mailto:{@$encodedEmailAddress}">{@$encodedEmailAddress}</a></dd>
                {My_Code}
      {/if}


I mean the
Quote:
{My_Code}

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:   
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