Moving content up and down from the page [solved]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
dwinters
Forum Members
Forum Members
Posts: 53
Joined: Mon Mar 17, 2008 12:46 pm

Moving content up and down from the page [solved]

Post 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
Last edited by dwinters on Sun May 18, 2008 5:53 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Moving content up and down from the page

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
dwinters
Forum Members
Forum Members
Posts: 53
Joined: Mon Mar 17, 2008 12:46 pm

Re: Moving content up and down from the page

Post 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
dwinters
Forum Members
Forum Members
Posts: 53
Joined: Mon Mar 17, 2008 12:46 pm

Re: Moving content up and down from the page

Post by dwinters »

Stiil struggling with this one!

Could the effect be acheived with pages and iframes?

Any ideas gratfully recieved

Thanks

Dan
sirab
Forum Members
Forum Members
Posts: 10
Joined: Fri Apr 25, 2008 8:14 pm

Re: Moving content up and down from the page

Post 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.
dwinters
Forum Members
Forum Members
Posts: 53
Joined: Mon Mar 17, 2008 12:46 pm

Re: Moving content up and down from the page

Post 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
dwinters
Forum Members
Forum Members
Posts: 53
Joined: Mon Mar 17, 2008 12:46 pm

Re: Moving content up and down from the page

Post 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
dwinters
Forum Members
Forum Members
Posts: 53
Joined: Mon Mar 17, 2008 12:46 pm

Re: Moving content up and down from the page

Post 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
Post Reply

Return to “CMSMS Core”