Improvements to Global Content Blocks
Posted: Thu Apr 05, 2012 5:35 am
I have a few suggestions to improve Global Content Blocks:
1) Add an extra field for 'Name', with the current 'name' field being changed to 'alias' (since that's really what it is). This field could then be used to display a more friendly title when loading a list of GCBs, such as allowing the editor to choose which GCBs to display on the current page.
If it's difficult to change the current field for compatibility reasons then adding a new field titled 'Friendly Name' would work too.
2) Add a checkbox for 'Literal' which automatically wraps the entire block in {literal} tags (just a nice handy shortcut for things such as inserting Google Analytics code or other scripts).
3) Allow folders for better sorting/grouping (similar to the Pages hierarchy list). I realise this has been raised before, but I'm just giving it a +1. Additionally it would be good if a permission could be set per folder (from the GCB page) which automatically applies to all items within that folder, unless specified otherwise. This would really help when several GCBs need their permissions changed, especially if drag-and-drop was available to move them into folders.
4) Allow sorting and filtering of the GCB list.
5) Allow multiple GCBs to be listed in one call, in the specified order, such as:
{global_content name='gcb_alias1,gcb_alias2'}
This would avoid the need to include one GCB inside another and reduce template/page code while keeping the current level of flexibility.
6) Allow an ID and/or multiple Classes to be applied to a GCB, which wraps the entire element in a DIV. This would be called as follows:
{global_content class='sidebox,float_right' id='news_list'}
This would produce:
<div id="news_list" class="sidebox float_right">
(the contents of the GCB here)
</div>
The benefit of this is that clients can edit GCBs without the potential to screw up any specific CSS (assuming they use the WYSIWYG editor). I often need to apply specific styles to individual GCBs but don't trust the client with it so I don't give them access, even though the contents of the GCB might be something fairly simple like an unordered list or paragraph.
1) Add an extra field for 'Name', with the current 'name' field being changed to 'alias' (since that's really what it is). This field could then be used to display a more friendly title when loading a list of GCBs, such as allowing the editor to choose which GCBs to display on the current page.
If it's difficult to change the current field for compatibility reasons then adding a new field titled 'Friendly Name' would work too.
2) Add a checkbox for 'Literal' which automatically wraps the entire block in {literal} tags (just a nice handy shortcut for things such as inserting Google Analytics code or other scripts).
3) Allow folders for better sorting/grouping (similar to the Pages hierarchy list). I realise this has been raised before, but I'm just giving it a +1. Additionally it would be good if a permission could be set per folder (from the GCB page) which automatically applies to all items within that folder, unless specified otherwise. This would really help when several GCBs need their permissions changed, especially if drag-and-drop was available to move them into folders.
4) Allow sorting and filtering of the GCB list.
5) Allow multiple GCBs to be listed in one call, in the specified order, such as:
{global_content name='gcb_alias1,gcb_alias2'}
This would avoid the need to include one GCB inside another and reduce template/page code while keeping the current level of flexibility.
6) Allow an ID and/or multiple Classes to be applied to a GCB, which wraps the entire element in a DIV. This would be called as follows:
{global_content class='sidebox,float_right' id='news_list'}
This would produce:
<div id="news_list" class="sidebox float_right">
(the contents of the GCB here)
</div>
The benefit of this is that clients can edit GCBs without the potential to screw up any specific CSS (assuming they use the WYSIWYG editor). I often need to apply specific styles to individual GCBs but don't trust the client with it so I don't give them access, even though the contents of the GCB might be something fairly simple like an unordered list or paragraph.