Sections within templates
| Author |
Message |
Kendle


Joined: Dec 16, 2004 Posts: 529
|
|
| Back to top |
|
 |
DJ Maze


Joined: Apr 19, 2004 Posts: 5668 Location: http://tinyurl.com/5z8dmv
|
Post subject: Re: Sections within templates Posted: Wed Dec 14, 2005 11:22 am |
|
Code:
assign_blocks_vars('section', array());
assign_blocks_vars('section.sub_section', array());
assign_blocks_vars('section.sub_section', array());
assign_blocks_vars('section.sub_section', array());
assign_blocks_vars('section.sub_section', array());
assign_blocks_vars('section', array());
assign_blocks_vars('section.sub_section', array());
assign_blocks_vars('section.sub_section', array());
assign_blocks_vars('section.sub_section', array());
assign_blocks_vars('section.sub_section', array());
DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Fedora 12 / 2.2.15 / 5.1.47 / 5.3.3 / CVS |
|
| Back to top |
|
 |
Kendle


Joined: Dec 16, 2004 Posts: 529
|
Post subject: Re: Sections within templates Posted: Wed Dec 14, 2005 11:54 am |
|
Doesn't work. The template works fine without the sub section (albeit not displaying what I want it to), so it must be just that bit that's at fault. Are there any examples of modules with a BEGIN - END block nested within another?
_________________ Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk
Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
 |
|
| Back to top |
|
 |
Biggles


Joined: Aug 03, 2005 Posts: 637 Location: St. Louis, MO
|
Post subject: Re: Sections within templates Posted: Wed Dec 14, 2005 3:02 pm |
|
The BEGIN and END statements should not have the parent/section id in them, they should be:
PHP:
<!-- BEGIN section --> ... <!-- BEGIN subsection --> ... <!-- END subsection --> ... <!-- END section -->
It's a little goofy since when assigning subsections to the block you have to have the section name but when displaying you don't. Here's an entire write-up of how the assign_block_vars() method works:
Forums/viewtopic/t=13852.html#91457
Biggles's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Win, Linux/1.3.34/4.0.26, 5.0.19/4.3.10, 5.1.2, 8.1.4(PostgresSQL)/9.0.6.1, CVS |
|
| Back to top |
|
 |
Kendle


Joined: Dec 16, 2004 Posts: 529
|
Post subject: Re: Sections within templates Posted: Wed Dec 14, 2005 4:22 pm |
|
Ah ha!! That's got it! Thanks a million Biggles this was beginning to do my head in. You're a hero!
_________________ Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk
Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
 |
|
| 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 You cannot attach files in this forum You cannot download files in this forum
|

|
User Info ![Show/hide content [x]](themes/dragonfly/images/minus.png)
 Welcome Anonymous
Last CVS commits ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Languages ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Community ![Show/hide content [x]](themes/dragonfly/images/minus.png)
 Support for DragonflyCMS in a other languages:
• Deutsch
• Español
X-links ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Preview theme ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.
|