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 3.1.7 - fetch() Error with multiple {include}'s

 
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 -> Smarty 3
View previous topic :: View next topic  
Author Message
cfreak1986
Smarty n00b


Joined: 18 Jan 2012
Posts: 2

PostPosted: Wed Jan 18, 2012 11:04 am    Post subject: Smarty 3.1.7 - fetch() Error with multiple {include}'s Reply with quote

Hey Smarty Community,

i wanted to create a template to send in an newsletter, but i have a Problem with smarty->fetch() when including more than one template inside the fetched template. (see code below)

With the include of the CSS everything is working fine, but if i uncomment one of the other includes smarty fetch has a very strange behavier, because some content is returned into my variable as expected but some content is directly shown on the page.

I found out, that it doesn't matter which include is uncommented, because with only one include everything works fine and fetch returns it into my variable but with more than one include some parts of the template get directly shown and some parts of the template are returned to my var.

I hope someone can please help me, because i don't get behind this problem Crying or Very sad , my used Smarty Version is 3.1.7.

Best Regards
cfreak

The used Template:

Code:
<style type="text/css">
   {include 'mailtemplates/css/HNL_template.css'}
</style>

{$date_array['Jan'] = 'Januar'}
{$date_array['Feb'] = 'Februar'}
{$date_array['Mar'] = 'März'}
{$date_array['Apr'] = 'April'}
{$date_array['May'] = 'Mai'}
{$date_array['Jun'] = 'Juni'}
{$date_array['Jul'] = 'Juli'}
{$date_array['Aug'] = 'August'}
{$date_array['Sep'] = 'September'}
{$date_array['Oct'] = 'Oktober'}
{$date_array['Nov'] = 'November'}
{$date_array['Dec'] = 'Dezember'}

<div align="center">
<p class="no_see_msg">
   - Falls Sie unseren Newsletter nicht oder nur teilweise sehen k&ouml;nnen, klicken Sie bitte
   <a href="{$templatevars.mailinfos.path}" target="_blank">hier</a> -
</p>

<table border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="nl_header">
   <tr>
      <td align="right"><img src="images/clip_image002.gif" alt="header" width="599" height="50"/>
      </td>
   </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%" class="nl_headline">
   <tr>
      <td>
         <h1 class="nl_h1">
         {$templatevars.mailinfos.titel} vom {$smarty.now|date_format:"%d. %b %G"}
         </h1>
         <br />
         {*include 'mailtemplates/helper/contenttable.tpl'*}
      </td>
   </tr>
</table>

{*include 'mailtemplates/helper/mail_contents.tpl'*}

<table class="tbl_main_box">
   <tr>
      <td align="left">
         <h2 class="nl_h2 h_line">Die neuesten E-Learning- / Image-Filme unserer Plattform</h2>
         {*include 'mailtemplates/helper/elearning.tpl'*}
         <p><strong><em>Unsere E-Learning Filme sind in aller Welt als Livestream zu empfangen.</em></strong></p>
         Hier gelangen Sie zur E-Learning Plattform:
         </td>
   </tr>
</table>

{*include 'mailtemplates/helper/product_news.tpl'*}

</td>
</tr>
</table>
</div>


And one of the Subtemplates for a better understanding (elearning.tpl):

Code:
{db_select tbl="v_nl_elearning7" cols=["id","gesellschaft", "titel","url_dsl", "filmstatus"] assign="elearning"}

{if is_array($elearning)}
   {foreach $elearning as $film}
      {$grouped_elearning[$film.gesellschaft][] = $film}
   {/foreach}

   {if is_array($grouped_elearning)}
      <table width="100%" border="0" cellspacing="2" cellpadding="8" style="font-size:12px;">
         {foreach $grouped_elearning as $gesellschaft => $filme}
            <tr>
               <th style="width:132px;" align="left" valign="top" class="dotted_th creme_bg">
                  {$gesellschaft}
               </th>
               <td align="left" valign="top" class="dotted_th white_bg">
                  {foreach $filme as $film}
                     <a href="{$film.path}" target="_blank">{$film['titel']}</a><br />
                  {/foreach}
               </td>
            </tr>
         {/foreach}
      </table>
   {/if}
{/if}
Back to top
View user's profile Send private message
cfreak1986
Smarty n00b


Joined: 18 Jan 2012
Posts: 2

PostPosted: Wed Jan 18, 2012 12:13 pm    Post subject: Okay is solved the Problem Reply with quote

The Problem is my firephp Script which uses ob_start().

So sorry for the post.

Greetz
cfreak
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 -> Smarty 3 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