Page 1 of 1

is it possible to have different content page sidebar?

Posted: Mon Oct 03, 2011 7:25 pm
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.

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

Posted: Mon Oct 03, 2011 7:33 pm
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

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

Posted: Tue Oct 04, 2011 7:59 am
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

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

Posted: Tue Oct 04, 2011 9:36 am
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?

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

Posted: Tue Oct 04, 2011 10:58 am
by n4tec
i will review the coding in regard to the error.. i do not have the sidebar_set gcb..

thx..

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

Posted: Tue Oct 04, 2011 8:22 pm
by Dr.CSS
If you call a GCB in page it must exist in Global Content Blocks page else you get an error...

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

Posted: Wed Oct 05, 2011 6:02 am
by n4tec
I have created the gcb called sidebar_ but still have the error.

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

Posted: Wed Oct 05, 2011 1:58 pm
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.

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

Posted: Thu Oct 06, 2011 5:45 am
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!!!

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

Posted: Thu Oct 06, 2011 7:23 am
by n4tec
i thought i had solved it but i haven't yet!!