List-View for certain categories

Requests for new features. You cannot post to this forum because new feature requests are not accepted any more.
Forum rules
New feature requests are no longer accepted, so you cannot post to this forum any more.
Locked
miguael
Posts: 63
Joined: 11 Dec 2009, 05:45

List-View for certain categories

Post by miguael » 26 Feb 2010, 03:30

While I was playing with some of the new features I thought it would be nice, when the list views would be choosable only for certain categories (like HELP).

I think that this would make too many options, but still it would be nice :-)

Any way to implement this with a hack or something?

Thanks

sayontan
Site Admin
Posts: 10210
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas
Contact:

Re: List-View for certain categories

Post by sayontan » 26 Feb 2010, 08:11

Adding this as an option would make it extremely complex. There are a bunch of ways you can do this. The easiest is to use category-specific templates. If you have a category with id 15, create a copy of category.php as category-15.php. In that file you will see a block of code:

Code: Select all

if ($suf_category_excerpt == 'list') {
	include_once(TEMPLATEPATH . '/layouts/layout-list.php');
}
else if ($suf_category_excerpt == 'tiles') {
	suffusion_after_begin_content();
	include_once(TEMPLATEPATH . '/layouts/layout-tiles.php');
}
else {
	suffusion_after_begin_content();
	include_once(TEMPLATEPATH . '/layouts/layout-blog.php');
}
Replace this with just one line:

Code: Select all

	include_once(TEMPLATEPATH . '/layouts/layout-list.php');

miguael
Posts: 63
Joined: 11 Dec 2009, 05:45

Re: List-View for certain categories

Post by miguael » 26 Feb 2010, 08:31

WOW - you are a magician... Thanks alot! Didn't know, that there is an option to make it work that way in wordpress - good to know!

PS: Is there a possibility to upgrade suffusion from the backend without losing those added files? (say: it just deletes all the original files but not the additional ones)

THX again!

sayontan
Site Admin
Posts: 10210
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas
Contact:

Re: List-View for certain categories

Post by sayontan » 26 Feb 2010, 08:56

Is there a possibility to upgrade suffusion from the backend without losing those added files? (say: it just deletes all the original files but not the additional ones)
I believe some themes manage this (like Atahualpa), but I haven't been able to.

Locked