Recent Topics

Hide title for current request

Started by on Mar 16, 2008 – Contents updated: Mar 16, 2008

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.

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 ;)

¥

Mar 16, 2008 11:36

¥åßßå Thanks again!

It works with these changes.

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


Form is loading...

Free CMS – This forum is powered by b2evolution CMS, a complete engine for your website.