2 topanga Dec 19, 2007 12:06

Thank you for reply, but it doesn't work in 2.xx. I got this message
Notice: Trying to get property of non-object in /home/.../myskin/_html_header.inc.php
The code I have in custom skin to display page title is
<?php
request_title( array(
'auto_pilot' => 'seo_title',
) );
?>
I still need to change the post title. Is here anybody who can help me, please?
Hi,
Topanga is completely correct. You should not fumble in the core for many reasons. Besides, what you want is possible from the skin.
I composed this hack. I have reasons to believe it is correct, but I didn't do the testing, so please try and report back if it works, gives errors or simply does nothing.
Good luck
<?php
if ( $disp = 'single' )
{
echo ( '<h3 class="bTitle">'.$Blog->name().'- '.$Item->title().'</h3>' )
}
else
{
echo ( '<h3 class="bTitle">'.$Item->title().'</h3>' )
}
?>
replaces:
<h3 class="bTitle"><?php $Item->title(); ?></h3>
<title>
<?php
request_title( array(
'auto_pilot' => 'seo_title',
'title_single_before' => $Blog->get( 'name' ).' - ',
) );
?>
</title>
;)
¥
¥åßßå wrote:
<title> <?php request_title( array( 'auto_pilot' => 'seo_title', 'title_single_before' => $Blog->get( 'name' ).' - ', ) ); ?> </title>
This is exactly what I need. Thanks, works perfect.
I spent all night playing with previous post. $Item->title() displays title URL.
¥åßßå deciphered the Japanese translation. I had to do with the 1.10 version.
¥åßßå, I copied your code in the [url=http://manual.b2evolution.net/TemplateTags]Wiki[/url] (# request_title() ). After you have played with the new toys, that inevetibly will not function anymore after one to two hours, will you check if I did a good job there?
Well done
You should allways and only change things in your skin, never in the code...
I used this in 1.10 , perhaps that still works
<?php echo format_to_output($Item->Blog->shortname, 'htmlbody' ); ?>