|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Fire2Burn Smarty n00b
Joined: 26 Oct 2012 Posts: 1
|
Posted: Fri Oct 26, 2012 1:07 pm Post subject: {block} Moving a block |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Oct 29, 2012 1:46 pm Post subject: |
|
|
That's not possible. The order of parent {block} tags can't be changed. |
|
Back to top |
|
|
|
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
|