Content blocks
Content blocks
Not completely sure if this is the best place to ask this, but there's something I'm having trouble with. I have prior experience with D**** but am learning CMSMS because D**** made it too hard for your average content manager to look after a website. There was one feature in D**** I made use of quite often, but I can't seem to find a parallel here - content blocks.
I've noticed this CMS has global content blocks which seem akin to regions in D****. What I'm looking for is quite different. If you take a look at the D**** homepage ***** you'll notice there are a few blue blocks running down the right-hand side of the website in a sidebar. I'm looking to implement the same thing in the website I'm working on with a range of blocks showing up in the sidebar. The website manager should be able to edit, delete and add new blocks to this sidebar from the backend in a similar way he would create content (i.e. without having to touch any template files).
I was wondering if there was anything similar in CMS Made Simple.
EDIT: One more thing. Unrelated but is it possible to edit template files and CSS files without using the in-browser editor. At the moment, I'm changing the CSS/template structure in a text editor (better search features and syntax highlighting) and copying it back to the browser.
I've noticed this CMS has global content blocks which seem akin to regions in D****. What I'm looking for is quite different. If you take a look at the D**** homepage ***** you'll notice there are a few blue blocks running down the right-hand side of the website in a sidebar. I'm looking to implement the same thing in the website I'm working on with a range of blocks showing up in the sidebar. The website manager should be able to edit, delete and add new blocks to this sidebar from the backend in a similar way he would create content (i.e. without having to touch any template files).
I was wondering if there was anything similar in CMS Made Simple.
EDIT: One more thing. Unrelated but is it possible to edit template files and CSS files without using the in-browser editor. At the moment, I'm changing the CSS/template structure in a text editor (better search features and syntax highlighting) and copying it back to the browser.
Last edited by Anonymous on Sat Jun 26, 2010 7:58 pm, edited 1 time in total.
Re: Content blocks
Edit: Sorry, dumb answer 
At the moment There is no way to add a block via the edit panel.
You need a tag in the template that prints out the added block.
The backend panel only shows what content blocks are in the template.
So if there is just one block for the right sidebar there will always remain one edit area in the admin panel.
I'm working on a module called AdvancedContent that will allow to do what you're looking for.
So you will only need to define "areas" in your template and in backend you can add blocks and assign them to the areas.
But this is not implemented yet.
(But it will in further releases)

At the moment There is no way to add a block via the edit panel.
You need a tag in the template that prints out the added block.
The backend panel only shows what content blocks are in the template.
So if there is just one block for the right sidebar there will always remain one edit area in the admin panel.
I'm working on a module called AdvancedContent that will allow to do what you're looking for.
So you will only need to define "areas" in your template and in backend you can add blocks and assign them to the areas.
But this is not implemented yet.
(But it will in further releases)
Last edited by NaN on Fri Jun 25, 2010 3:49 pm, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Content blocks
CMSMS (core) doesn't support adding an arbitrary number of content blocks per page by itself like that.
but there are a number of ways you can do it. This is because typically allowing the user to add umpteen content blocks to a single page can and will sooner or later break the design, and the layout and the content becomes un-managable.
a) The easiest, and best way to do it IMnsHO is to use a module like News, CompanyDirectory, Products, CGBlog.... to allow adding articles. Even if it's just text blurbs... then you can completely control the input, and display, and possibly display those articles in different ways on different pages, and have RSS capabilities (with the CGFeedMaker module). Some modules allow content expiry, and handle frontend submission, or draft/published status.
b) The second best way to do this is to install the CGSimpleSmarty module to gather information from child pages and display it on the parent. You could setup a special page template for the user to use, and to add a blurb to the parent page all he would have to do is add a new content page using the specified template.
c) With a tiny bit of PHP programming you could pull global content blocks into the page.
--
As far as your other question... see the TemplateExternalizer module.
but there are a number of ways you can do it. This is because typically allowing the user to add umpteen content blocks to a single page can and will sooner or later break the design, and the layout and the content becomes un-managable.
a) The easiest, and best way to do it IMnsHO is to use a module like News, CompanyDirectory, Products, CGBlog.... to allow adding articles. Even if it's just text blurbs... then you can completely control the input, and display, and possibly display those articles in different ways on different pages, and have RSS capabilities (with the CGFeedMaker module). Some modules allow content expiry, and handle frontend submission, or draft/published status.
b) The second best way to do this is to install the CGSimpleSmarty module to gather information from child pages and display it on the parent. You could setup a special page template for the user to use, and to add a blurb to the parent page all he would have to do is add a new content page using the specified template.
c) With a tiny bit of PHP programming you could pull global content blocks into the page.
--
As far as your other question... see the TemplateExternalizer 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.
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.
Re: Content blocks
Thanks for the help.
You seem to have misunderstood my question, calguy (although I'm not sure if it really changes your answer). The blocks I'm looking to add are site-wide. For example, let's say the client has an online store and wants to advertise a sale that's on. He can go into the admin panel and create a new content block, add a '10% off all products - this week only!' image to it and have it output in the sidebar on every page of the website.
You seem to have misunderstood my question, calguy (although I'm not sure if it really changes your answer). The blocks I'm looking to add are site-wide. For example, let's say the client has an online store and wants to advertise a sale that's on. He can go into the admin panel and create a new content block, add a '10% off all products - this week only!' image to it and have it output in the sidebar on every page of the website.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Content blocks
You don't want the user to be able to add/edit/delete umpteen different blocks, you want to provide say 3 or 4 areas that he can control site wide.
I would do this with global content blocks.
just give the user 3 or 4 GCB's called something like 'sidebar_block_1', 'sidebar_block_2' etc.
and then call them in your template in a smart way so that they automatically collapse.
like:
Then your user just has those content blocks that he can edit... if they are empty nothing is displayed
if they are not empty they are displayed site wide.
A Tip: You can also have GCB's call other GCB's i.e: you could put this code in your page template:
{global_content block='display_sidebars'}
then your 'display_sidebars' GCB could contain the above code (repeated for the fixed number of content blocks that the user should be able to edit.
Edit: in the specific example you specified.. I'd use News, with a special category... News articles are displayed in the sidebar with a specific template, and when the 'promotion' expires, the article is no longer shown.
I would do this with global content blocks.
just give the user 3 or 4 GCB's called something like 'sidebar_block_1', 'sidebar_block_2' etc.
and then call them in your template in a smart way so that they automatically collapse.
like:
Code: Select all
{global_content block='sidebar_blick_1' assign='sidebar_block_1_var'}
{if $sidebaar_block_1_var != ''}
<div class='sidebar_block'>{$sidebar_block_1}</div>
if they are not empty they are displayed site wide.
A Tip: You can also have GCB's call other GCB's i.e: you could put this code in your page template:
{global_content block='display_sidebars'}
then your 'display_sidebars' GCB could contain the above code (repeated for the fixed number of content blocks that the user should be able to edit.
Edit: in the specific example you specified.. I'd use News, with a special category... News articles are displayed in the sidebar with a specific template, and when the 'promotion' expires, the article is no longer shown.
Last edited by calguy1000 on Fri Jun 25, 2010 4:10 pm, edited 1 time in total.
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.
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.
Re: Content blocks
one of the things i like most about cms made simple is that its output is not structured into "blocks" like a *nuke, joomla, or other overweight cms/portal. it is easy to put whatever you want, wherever you want it.
for a client-editable site-wide content 'block' in a sidebar, that may change in content or function (or even not have anything in it at all at times) without template modification, a global content block (or blocks) would be easiest to set up.
i just finished up doing something like what calguy describes on one of my own sites... a {global_content name='custom-sidebar'} is called in the template. that gcb contains a little smarty logic that determines what other gcb's should be displayed and on what pages ('custom-sidebar' itself contains no content to output), and then it calls the appropriate gcb's
_____
for editing css/templates outside of the web-based administration, there is a module called template externalizer. don't know what the status of it is, but i think that's what you're looking for.
for a client-editable site-wide content 'block' in a sidebar, that may change in content or function (or even not have anything in it at all at times) without template modification, a global content block (or blocks) would be easiest to set up.
i just finished up doing something like what calguy describes on one of my own sites... a {global_content name='custom-sidebar'} is called in the template. that gcb contains a little smarty logic that determines what other gcb's should be displayed and on what pages ('custom-sidebar' itself contains no content to output), and then it calls the appropriate gcb's
_____
for editing css/templates outside of the web-based administration, there is a module called template externalizer. don't know what the status of it is, but i think that's what you're looking for.
Last edited by kermit on Fri Jun 25, 2010 5:18 pm, edited 1 time in total.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Re: Content blocks
Hmm, the fixed number of global content blocks seems like the way to go at this point. Some blocks are going to stay there permanently so I don't know if using the News module is the best idea (although this may change after some experimentation). The only thing I'm concerned about is not being able to edit the order of the blocks easily but that shouldn't really be too big of a deal.
Thanks for the help. Very useful and much appreciated.
Thanks for the help. Very useful and much appreciated.
Re: Content blocks
if you go with the 'nested' gcb's, you have ONE in the page template, and that one will call the others, you can remove, add or rearrange them in there easily enough.NRaf wrote: The only thing I'm concerned about is not being able to edit the order of the blocks easily but that shouldn't really be too big of a deal.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Re: Content blocks
I've tried to implement the nested GCB however I've run into an issue. Unfortunately the Content field is required so I can't leave it empty. Is there anyway around this?
Re: Content blocks
you want a page without anything in its content block? try an html or smarty {* *} comment.NRaf wrote: Unfortunately the Content field is required so I can't leave it empty. Is there anyway around this?
Last edited by kermit on Sat Jun 26, 2010 6:49 pm, edited 1 time in total.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info