Ability to toggle Global Content Blocks on/off

Talk about new features for CMSMS and modules.
Post Reply
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Ability to toggle Global Content Blocks on/off

Post by jmcgin51 »

I'm looking for the functionality to be able to use a checkbox or radio button to toggle the display of a GCB.  For example, I could set up a GCB with an announcement, such as "Sorry, our store is closed today due to a family emergency".  I then put this GCB on my homepage.  Somewhere in the admin would be a "GCB Display" page, which would list each GCB title along with a pair of radio buttons.  On button for "Display This GCB: YES" and the other for NO.  This would let any authorized user quickly and easily control which GCBs are displayed, without having to go into the template or page and add/edit/remove GCB tags.

Is there anything in the current CMSMS that would provide similar functionality?  What about anything coming in 2.0?

Thanks
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Ability to toggle Global Content Blocks on/off

Post by calguy1000 »

Just comment them out

put {* at the front and *} at the end
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.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Ability to toggle Global Content Blocks on/off

Post by jmcgin51 »

right, but that means someone has to open each GCB...  I'm looking for something simpler.  I have clients who don't understand "commenting".  I do, but they don't.

In other pages I've hard-coded, I've provided this functionality via a simple checkbox, and I'd like to figure out a way to do it within the CMSMS framework...

I would think this could be done pretty simply as a module, but unfortunately I'm clueless when it comes to modules, and more unfortunately don't have the time to learn right now...

thanks
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Ability to toggle Global Content Blocks on/off

Post by calguy1000 »

unfortunately, adding the ability to enable/disable GCB's or UDT's would require a database schema change, and significant code changes.

It's probably not feasible at this time.

Maybe use the news module to display a 'motd' category and a limit of 1 article.
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.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Ability to toggle Global Content Blocks on/off

Post by Nullig »

As an interim solution, you could have two identical templates/pages, except for the inclusion of the GCB in one of them. Then the user just has to activate the appropriate one, instead of editing the template/page.

Nullig
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Ability to toggle Global Content Blocks on/off

Post by jmcgin51 »

that's interesting; hadn't thought of that...

thanks Nullig and Calguy!
gocreative
Power Poster
Power Poster
Posts: 265
Joined: Mon Mar 14, 2011 1:16 am
Location: Brisbane, Australia

Re: Ability to toggle Global Content Blocks on/off

Post by gocreative »

I realise this is old, but another solution would be to create a new GCB called something like 'show-announcement' and insert this into the page template. If any value is present, show the other GBS that you want to display on the site, such as 'major-announcement'. And if 'show-announcement' is empty, don't show the other GCBs. That way the user need only edit one GCB in order to show the others.
Post Reply

Return to “Feature ideas”