Recent Topics

1 Mar 16, 2008 10:50    

My b2evolution Version: Not Entered

In 2.4 how can we hide TITLE FOR THE CURRENT REQUEST if a parent category requested? Now it shows me "Categories: *A loooooooong list of 40 categories* "
As I checked request_title function doesn't have a built-in param to hide it.

Please help.

2 Mar 16, 2008 11:12

You *might be able to do something like :

<?php
$saved_disp = $disp;
if( isset( $cat ) )
{
  $foo = get_the_category_by_ID( $cat );
  $disp = 'catdir';
  $cat_text = T_( 'Category' ).' : '.$foo->dget('name', 'htmlbody' );
}
else
{
  $cat_text = T_('Category directory');
}
	// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
	request_title( array(
			'title_before'=> '<h2>',
			'title_after' => '</h2>',
			'title_none'  => '',
			'glue'        => ' - ',
			'title_single_disp' => true,
			'format'      => 'htmlbody',
			'catdir_text' => $cat_text,
		) );
	// ------------------------------ END OF REQUEST TITLE -----------------------------
$disp = $saved_disp;
?>

Untested of course ;)

¥

3 Mar 16, 2008 11:36

¥åßßå Thanks again!

It works with these changes.

$cat_text = T_( 'Category' ).' : '.$foo['cat_name'];


Form is loading...