Hi
I have a site which contain several content blocks per page. When editing in the admin, the content editing blocks are displayed in the same order they appear in the template.
But is there a way to change the order they are displayed in the editor?
I was looking on the forum, but cannot find any info, but was wondering if you could use the {capture} to add the content blocks to the bottom of the template and then regurgitate the content output higher up the template. I tried but could not make it work.
Hope that makes sense!
Steven
ANy ideas
[solved] change order of content blocks in editor
[solved] change order of content blocks in editor
Last edited by stevegos on Wed Apr 18, 2012 3:54 pm, edited 1 time in total.
Re: change order of content blocks in editor
Steven,
put them in the template as a {content assign="first"}, when that is done in the sequence that you want them, that is how they will show while editing.
Where the original {content} was placed, call {$first} instead, or however you assigned the variable mentioned above. That will be the frontend-display.
Btw, the same routine can be used to check whether a content-block has data inside, and act on that...
Ronny
put them in the template as a {content assign="first"}, when that is done in the sequence that you want them, that is how they will show while editing.
Where the original {content} was placed, call {$first} instead, or however you assigned the variable mentioned above. That will be the frontend-display.
Btw, the same routine can be used to check whether a content-block has data inside, and act on that...
Ronny
Re: change order of content blocks in editor
Thanks Ronny
I just tried that but cannot get it work.
Where {content} is placed I entered:
then at the bottom of the template I entered:
The edit boxes appear in the editor but the content does not appear in the output.
Have I miss understood or go something wrong?
Steven
I just tried that but cannot get it work.
Where {content} is placed I entered:
Code: Select all
{$first}
{$second}
Code: Select all
{content assign="first" block="first"}
{content assign="second" block="second"}
Have I miss understood or go something wrong?
Steven
Re: change order of content blocks in editor
Code: Select all
</__body>
<!-- Sequence in editor -->
{content assign="first"}
{content block="second" assign="second"}
<div id="main">
<!-- Sequence in frontend -->
{$first}
{$second}
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: change order of content blocks in editor
Thank you. That works fine.
I always assumed the {content} tag was mandatory, but if I add in my own I can remove it.
Steven
I always assumed the {content} tag was mandatory, but if I add in my own I can remove it.
Steven
Re: [solved] change order of content blocks in editor
Steven,
{content} is still mandatory, but you are using it...
{content assign="number1"} is basically the call for {content} where the data is not showing but put in the variable $number1. With this, you can check it, and also show it with {$number1} as described in the posts before.
So you are using the required one, next to some others that have block= for the naming, but you store the data.....
Ronny
{content} is still mandatory, but you are using it...

{content assign="number1"} is basically the call for {content} where the data is not showing but put in the variable $number1. With this, you can check it, and also show it with {$number1} as described in the posts before.
So you are using the required one, next to some others that have block= for the naming, but you store the data.....
Ronny
Re: [solved] change order of content blocks in editor
You have to call the {content assign='number1'} first then lower down you can call {$number1}...