Jump to content

Archived

This topic is now archived and is closed to further replies.

carsten

How to use custom sidebar on category pages

Recommended Posts

carsten

I Wonder how it possible to af a custom sidebar to a category page.

Share this post


Link to post
Share on other sites
James B

Do you mean a different sidebar on each category page? If so then this isn't possible unfortunately in the current version of DMS. Category pages all work off the same template, so a change made on one would reflect on others. So for example, you couldn't have say 'red' category with one sidebar and 'blue' category with another alternate sidebar, they would both have to have the same sidebar.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
carsten

Hi James.

 

I am sorry to hear. I need different sidebars on different category pages.

 

So - is it possible to make a category postloop on a new page?? If so - whish code do I have to use??

Share this post


Link to post
Share on other sites
asialove

I guess you can have different sidebar on different category.

 

for example, you have two category:  first is "Monday", second is "Sunday".

 

when you design the page template for your "monday" category, do not add sidebar section, just add a textbox section on thr right column (in case you want a float right sidebar"

 

and then add sidebar short codes into the textbox section.

Share this post


Link to post
Share on other sites
asialove

A tempory solution:

 

Edit the pageline dms file: /dms/editor/editor.page.php

 

locate elseif( is_category() ) and relace 

 

 
elseif( is_category() )
$type = 'category';

 

with

 

 


elseif( is_category() )
{
  $current_cat = intval( get_query_var('cat') );
  $type = 'category-'.$current_cat; 
}
 
This is a temproy solution, I do not know how to write hooks or plugins to manager this.
 
the above method will enable you to have different template on each of your category..

Share this post


Link to post
Share on other sites
carsten

Hi asialove

 

Exciting stuff :v - I will train for this - while I'm not a Expert -  and come back to you soon. Tanks a lot.

Share this post


Link to post
Share on other sites
asialove

Did you found the solution?

Share this post


Link to post
Share on other sites
James B

If you edit the core code it will be wiped each time you update the site so we don't advise this. Version 2 of DMS is released shortly and has completely revised how templates are saved/store, so it would be best to wait for this.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

×