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

 
Post new topic   Reply to topic    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
Fire2Burn
Smarty n00b


Joined: 26 Oct 2012
Posts: 1

PostPosted: Fri Oct 26, 2012 1:07 pm    Post subject: {block} Moving a block Reply with quote

Feature request
Moving a parent block to another part of the template.

Example
base_article.tpl:
Code:
<html>
   <body>
      <aside>
         {block 'aside'}
            Menu
         {/block}
      </aside>
      <article>
         {block 'description'}
            <h1>Article title</h1>
         {/block}
         {block 'media'}
            <img src="article_img.jpg" />
         {/block}
      </article>
   </body>
</html>


article.tpl:
Code:
{extends 'module:base_article.tpl'}
{block 'aside' append}
   {block move 'media'}{block}
{/block}


output:
Code:
<html>
   <body>
      <aside>
         Menu
         <img src="article_img.jpg" />
      </aside>
      <article>
         <h1>Article title</h1>
      </article>
   </body>
</html>
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Mon Oct 29, 2012 1:46 pm    Post subject: Reply with quote

That's not possible. The order of parent {block} tags can't be changed.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Feature Requests 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