is it possible to have different content page sidebar?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
n4tec

is it possible to have different content page sidebar?

Post by n4tec »

i am currently designing a cmsms template for a medical journal. i have the lastest version installed on an xampp offline server on another computer.

i have now got to the point where i needed to have different sidebar content for the content pages. am wondering if it possible.

thx!!

ps: not sure i have posted in correct forum.
uniqu3

Re: is it possible to have different content page sidebar?

Post by uniqu3 »

Depends what you want in your sidebar, but there are multiple solutions.

One would be using GlobalContentBlocks
Another would be {content block='sidebar' label='This is my sidebar'}
Or you can also look at this post: http://www.i-do-this.com/blog/42/Give-Y ... ir-Sidebar or this http://www.i-do-this.com/blog/36/Give-Y ... ir-Sidebar
n4tec

Re: is it possible to have different content page sidebar?

Post by n4tec »

i have tried using the code in the following link.
http://www.i-do-this.com/blog/42/Give-Y ... ir-Sidebar

but am getting an error.
string(727) "Smarty error:unable to read resource:"global content
where do i put these code?

Code: Select all

{content block="global_content_blocks" page_tab="Sidebar" block_type="select_multiple" sortable="true" items=":::get_gcb_list incl_prefix='sidebar_' delimiter='|' output='name':::" assign="global_content_blocks" smarty=true}
am getting a fatal error regarding memory size if i put it in global content block or template..

thx
uniqu3

Re: is it possible to have different content page sidebar?

Post by uniqu3 »

That code should go in your page template.
But looks like you have a typo somwhere? Error says it can't read "global content" as global content should be global_content.
And do you have any Global Content Blocks with prefix sidebar_ set?
n4tec

Re: is it possible to have different content page sidebar?

Post by n4tec »

i will review the coding in regard to the error.. i do not have the sidebar_set gcb..

thx..
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: is it possible to have different content page sidebar?

Post by Dr.CSS »

If you call a GCB in page it must exist in Global Content Blocks page else you get an error...
n4tec

Re: is it possible to have different content page sidebar?

Post by n4tec »

I have created the gcb called sidebar_ but still have the error.
uniqu3

Re: is it possible to have different content page sidebar?

Post by uniqu3 »

You did read the whole post?
After adding gcb do you still get errors? do you see a list of GCB in backend when editing page?

incl_prefix='sidebar_' is used to check for GCB with a prefix sidebar_ in their name, rename it to sidebar_something.
If it still doesn't work then please reply if error is different now or still the same and/or pm me your credentials and ill have a peek there.
n4tec

Re: is it possible to have different content page sidebar?

Post by n4tec »

thanks !! but my site is not on an online server but an offline one..

But i have finally solved it after i figured i may have mixed up the order of things.

i put in the template

Code: Select all

{content block="global_content_blocks" page_tab="Sidebar" block_type="select_multiple" sortable="true" items=":::get_gcb_list incl_prefix='sidebar_' delimiter='|' output='name':::" assign="global_content_blocks" smarty=true}
then put these in global_content_blocks text area created by above code which i had not been doing leading to the error..

Code: Select all

{* content will be divided on the basis of the delimiter into an array *}
  {assign var="global_content_blocks_array" value="|"|explode:$global_content_blocks}
 {* pass array *}...


or code can be in gcb inside the txtarea in the content pages..

SOLVED!!

Thanks once again!!!
n4tec

Re: is it possible to have different content page sidebar?

Post by n4tec »

i thought i had solved it but i haven't yet!!
Locked

Return to “Layout and Design (CSS & HTML)”