Inserting a page's content into a GCB?

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
rbaby
Forum Members
Forum Members
Posts: 144
Joined: Thu Feb 07, 2008 10:28 pm

Inserting a page's content into a GCB?

Post by rbaby »

I would like to have the content of a Global Content Block to be editable via the pages so users with "Editor" permission can update the copy without needing access to the Global Content Block and possibly breaking the display inadvertently.

Is there a way to do this? I initially thought that the "assign" property for {content} would do this, but it did not so I guess I misunderstood how that actually works.

Any guidance would be really appreciated.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Inserting a page's content into a GCB?

Post by velden »

Not sure what you want exactly: A GCB is ment to enter 'content' once for use on many pages. You can't edit it from a page, only from the GCB section itself.

Perhaps, but I don't know the possible disadvantages of this approach, you could consider using a separate page, and page template.

Give the page template a content blocks for every part you want the editor to be able to fill something in. Create a new page, hidden from the menu (maybe it's even allowed to disable it, just test it) and attach the new page template to it.

Then use the CGSimpleSmarty module's method 'get_page_content' to get the 'values' for the different content blocks of that page. Use those in your GCB or other page template(s).

Nice thing is that combined with e.g. the ECB module you can create some nice content blocks, like color picker, checkboxes, dropdowns etc. etc.

By the way: not sure why the editor could break the display. You might want to separate the content in the GCB's from the 'display' in the page template(s).
Read about template inheritance
rbaby
Forum Members
Forum Members
Posts: 144
Joined: Thu Feb 07, 2008 10:28 pm

Re: Inserting a page's content into a GCB?

Post by rbaby »

Thank you velden for your response! I will try what you suggested.

The reason why I like to protect my GCB is because I usually put the entire container there as well so I can call it in anywhere as a whole. A lot of our editors are really really novice and they will likely delete a div here or there, even simple UDT tags are a bit complex for them.

Open to other suggestions as well.
Post Reply

Return to “The Lounge”