CMS MADE SIMPLE FORGE

AdvancedContent

 

[#4737] Add Blocktype

avatar
Created By: Will (will83)
Date Submitted: 2010-03-28 11:26

Assigned To: Georg Busch (nan)
Resolution: Works For Me
State: Closed
Summary:
Add Blocktype
Detailed Description:
Congratulations this is an excellent plugin!

It's possible to add a type="gcb" param for a global content blocks listing, so
a simple way to add gcb in pages?

Thanks!

History

Comments
avatar
Date: 2010-03-28 13:01
Posted By: Georg Busch (nan)

Thanks for your feedback.

Including GCBs can also be done by just creating a contentblock of type
'dropdown' or 'select_multiple' where you enter the names of the content blocks
as items.

E.g.  

{content block='gcb' label='Global Content Block' type='dropdown'
items=',GCB1,GCB2,GCB3' assign="gcb"}
{if $gcb != ''}
{global_content name=$gcb}
{/if}

(the comma at the beginning of the value of the items param is just to create an
empty item in backend. so the user can 'disable' the content block. you also
could use items='none,gcb1,gcb2,gcb3' and check in template
{if $gcb!='none'} instead of '')

But you're right. Having an automatic generated list of global content blocks in
backend would be much more comfortable.
Since JeremyBass added smarty processing in backend (wich i modified in the
latest release - so still needs some testing) you could create a UDT that lists
the gcbs and call the content block in the template like this:

{content block='gcb' label='Global Content Block' type='dropdown'
items='{your_udt_that_lists_gcbs}' smarty=true assign='gcb'}

But i wil think about your idea since i'm about adding some more compatibility
to modules and core functions where i will need some other types of content
blocks anyway.

cheers.
      
avatar
Date: 2010-03-28 14:34
Posted By: Georg Busch (nan)

Just some correction...

items='{your_udt_that_lists_gcbs}' won't work

use

items=':::your_udt_that_lists_gcbs:::' instead
      
avatar
Date: 2010-03-29 18:19
Posted By: Will (will83)

I thought the UDT (which I am unable to develop), but, to my mind, GCB require a
special field, not just a dropdown or multiselect.
Let me explain: to be really interesting, the field should allow for changing
the order of the blocks against each other (for example with a field like this :
http://davidwalsh.name/dw-content/multi-select.php)
I am not a developer, unfortunately, but I think that GCB are very powerful
tools whose value is reduced by the lack of functionalities.

Your pluging is a real bomb that will greatly improve the page creation.

If GCB are planned to appear in the plugin, it would be great!
Congratulations for your job and good luck for the future!

(Apologize my english, i'm french)
Will
      
avatar
Date: 2010-05-21 13:51
Posted By: Georg Busch (nan)

After thinking about the gcb stuff i decided not to integrate gcbs in this
module by default.
The reasons:
1. Sometimes you don't want to have all gcbs listed but just some specific ones
2. In the most cases you want to display several gcbs in different areas of your
page at once. So you need several input fields. (one for each area) Having only
one gcb select field by default in this content type will result in that you are
only able to enable and disable gcbs for the whole page. But you're not able to
say "theses ones left, theses ones right, this on top and this on bottom ...
etc."

So using content blocks of type dropdown/select_multiple and a plugin that lists
that gcbs you want to is a better way to integrate gcbs i think.
      
avatar
Date: 2010-05-31 17:40
Posted By: Georg Busch (nan)

Okay, i thougth about it again.
Having sortable items is really a very good idea.
Version 0.3.2 will at least have sortable "mutliple select lists".
Actually the items won't be displayed as a select list at all but as a group of
checkboxes that can be reordered.

It is not exactly like the example you provided above (what was pretty nice) but
it will result in the same functionality.
Hope you'll like it.

To get a list of global content blocks try this UDT that i recently created:
http://wiki.cmsmadesimple.org/index.php/Share_your_tags_here#get_gcb_list

So using this UDT you can in version 0.3.2 add a sortbale list of gcbs to your
edit are like this:

{content type="select_multiple" sortable_items="true" values=":::get_gcb_list
prefix='banner' filter='include':::"}

This will result an a list of global content blocks where the name starts with
"banner".

I will release v.0.3.2 during this week.
      
avatar
Date: 2010-05-31 17:41
Posted By: Georg Busch (nan)

Sorry, the example is wrong. You will need to add the param smarty=true to get
it working:

{content type="select_multiple" sortable_items="true" values=":::get_gcb_list
prefix='banner' filter='include':::" smarty=true}
      
avatar
Date: 2010-06-04 11:06
Posted By: Will (will83)

Thank you very much for this new feature and your UDT! This module multiplies
the capacity of the
CMS! Thank you for the time you spend to improve CMSMS!
      
Updates

Updated: 2010-06-20 15:32
state: Open => Closed

Updated: 2010-06-16 18:32
resolution_id: 5 => 11
assigned_to_id: 100 => 3991

Updated: 2010-03-28 11:27
description: It's possible to add a type="gcb" param for a global content blocks listing, so a simple way to add gcb in pages? Thanks! => Congratulations this is an excellent plugin! It's possible to add a type="gcb" param for a global content blocks listing, so a simple way to add gcb in pages? Thanks!
resolution_id: => 5