Recent Topics

1 Feb 12, 2007 17:08    

My b2evolution Version: 1.9.x

Hey, anyone know of a way to make a clicked category display not only its own posts but also the posts of all its subcategories?

For example, if the user clicks on the "Wild Birds" category, I want to display the post "All About Birds" as well as the post "Birdhouse Basics" under the "Birdhouse" subcategory.

Thanks,

Cindy Rae

2 Jan 17, 2008 18:28

The easiest way I've found to accomplish this so far is at the point of post entry -- enter a post under not only its subcategory but for all the ancestor categories for the post as well.

Programmatically, I haven't tackled this issue and probably won't at this point.

- Cindy Rae

3 Jan 17, 2008 18:48

Interesting. It used to do that (show all the child cats when you clicked on a mommy cat), or at least I'm pretty sure it did. My brain is shot so I don't even know where my socks are if they're not on my feet.

With the million different configs you can do in the back office, it'd be nice if you could also say "show kids on parent-click: yes/no" but I personally would be hacking files to find the answer rather than wait for a core change.

4 Jan 17, 2008 19:04

<?php
if( isset( $cat ) ){
compile_cat_array( $cat, array(), $cat_array, $foo );
pre_dump( $cat_array );
}
?>

¥

5 Jul 16, 2008 17:55

Is there a way to "not" display the category/categories at the top of the page when someone clicks on it? I like having my category title displayed but not with the word "Category" in front of it and not with the subcategory titles trailing behind. Thank you

6 Jul 16, 2008 18:09

Use this code for b2evo 2.x

// ------------------------ TITLE FOR THE CURRENT REQUEST ------------------------
$saved_disp = $disp;

if( isset( $cat ) )
{
	$foo = get_the_category_by_ID( $cat );
	$disp = 'catdir';
	$cat_text = T_( 'Category' ).' : '.$foo['cat_name'];
}
else
{
  $cat_text = T_('Category directory');
}

request_title( array(
		'title_before'		=> '<h2>',
		'title_after'		=> '</h2>',
		'glue'				=> ' - ',
		'title_single_disp' => false,
		'format'			=> 'htmlbody',
		'catdir_text'		=> $cat_text,
	) );
				
$disp = $saved_disp;
// ----------------------------- END OF REQUEST TITLE ----------------------------

© ¥åßßå

7 Jul 19, 2008 15:13

I'm really new to this so please excuse my ignorance.

First, the code that's been offered here by ¥åßßå and sam2kb where does that get placed?

Second, I'm curious about the reverse of the original post. I'd like to see ust the posts from a category in a sidebar and have not been able to figure out how to modify the post_list widget.

Thanks!


Form is loading...