Page 1 of 1

Moving content up and down from the page [solved]

Posted: Mon Mar 17, 2008 1:09 pm
by dwinters
I have an issue with moving content blocks up and down easily with a front end the user can see:

Say I have 10 content blocks in a page - template  is:

{content block='piece1'}
{content block='piece2'}
{content block='piece3'} etc..........

I am in page edit view and want to move them up / down

Dont want to copy paste in and out of each content edit block

want an arrow move up in template move down etc. (I undersatnd I would have to have one template per page with this system)

Anyone made such a mod? Would be able to make this mod?

Cheers

Dan Winters

Re: Moving content up and down from the page

Posted: Mon Mar 17, 2008 1:12 pm
by calguy1000
That's not the way content blocks work..... they're statically positioned in the page template.

If you want something the frontend user will be able to re-order, you'll probably need to write a module.

Re: Moving content up and down from the page

Posted: Mon Mar 17, 2008 1:22 pm
by dwinters
Thanks for your quick reply! Thats service!

Sure I sort of knew that thats not how it is supposed to work "out of the box"

Do you know of any modules that come close to this functioanlity? Cataloge?

Or where will I find someone to write the module - My coding is a little rusty!

Thanks
Dan

Re: Moving content up and down from the page

Posted: Mon Apr 28, 2008 10:51 am
by dwinters
Stiil struggling with this one!

Could the effect be acheived with pages and iframes?

Any ideas gratfully recieved

Thanks

Dan

Re: Moving content up and down from the page

Posted: Mon Apr 28, 2008 11:00 am
by sirab
Don't know for sure if this is what you want: but can't you put DIVs around each content block and put arrows in those blocks and then with javascript program what the going up and down? I am not a javascript programmer but guess this code can be looked up thru google.

Re: Moving content up and down from the page

Posted: Tue Apr 29, 2008 9:30 am
by dwinters
Not really I am trying to move the content block in a template (or have the effect of)

So three sections green blue brown

template

{Content block="green"}

{Content block="blue"}

{Content block="brown"}


need to now have

{Content block="blue"}

{Content block="green"}

{Content block="brown"}

But need the user to be able to change the order they display in a page easy without editing templates


So this is how close I have come. Use menu for the order and pull a global content block of the same name in so

template = {cms_module module='menumanager' template='global_test' }

Global test menu ->
{if $count > 0}
{foreach from=$nodelist item=node}

{global_content name='{$node->menutext}'}

{/foreach}
{/if}

But it gives a blank page after the menu is called

Can anyone tell me if the syntax is right?
Or any other pointers.

Thanks
Dan

Re: Moving content up and down from the page

Posted: Mon May 12, 2008 3:23 pm
by dwinters
Syntax is still holding me up on this one - Can you nest tags like I am trying to do?

If not then how can I say:

{Global content block=(first item in the menu) }

{Global content block=(second item in the menu) }


This way I can use the page order to allow user to move content blocks around, but need a bit of help!

Cheers Guys

Dan

Re: Moving content up and down from the page

Posted: Sun May 18, 2008 5:52 pm
by dwinters
Did it a sweet bit of simple code in the menu to use the menu to order content blocks based on page order - and have one page as a child to the calling page for each piece of content.

Great for league tables - or any list where things change up and down, hope this helps... My first contribution back to the team!

Make a menu containing ->

{if $count > 0}
{foreach from=$nodelist item=node}

{capture assign='m_alias'}{$node->alias}{/capture}

{$cgsimple->get_page_content($m_alias)}

{/foreach}
{/if}

Then a Parent page containing

{menu template="whatever_you_called_the_menu" start_level="2"}

And create a pages as a children of the calling page for each piece of content you require - then order then on the page using the up down of the menu.

Let me know if anyone finds this useful -- cheers

Dan