|
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 |
artvolk Smarty Regular
Joined: 09 Dec 2009 Posts: 45
|
Posted: Wed Dec 09, 2009 9:25 am Post subject: Is it possible to nest <block>? |
|
|
Good day!
The idea is the following:
page.tpl:
Code: |
<html>
<head>
<title>{block name='title'}{/block}</title>
</head>
<body>
{block name='content'}
{/block}
</body>
</html>
|
form_page.tpl:
Code: |
{extends file='page.tpl'}
{block name='content'}
<form>
{block name='form_content'}
</form>
{/block}
|
my_current_page.tpl
Code: |
{extends file='form_page.tpl'}
{block name='form_content'}
... fields of form
{/block}
|
Is this possible?
Thanks in advance! |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Dec 09, 2009 3:19 pm Post subject: |
|
|
This is not supported. But let me think about it. |
|
Back to top |
|
artvolk Smarty Regular
Joined: 09 Dec 2009 Posts: 45
|
Posted: Wed Dec 09, 2009 3:24 pm Post subject: |
|
|
Thanks!
For now I just modified parent template to use two extra blocks:
{block name='content_top'} -- to place open form tag
{block name='content'} -- for content
{block name='content_bottom'} -- to place close form tag |
|
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
|