Recent Topics

'title_after' not properly working

started by on Feb 16, 2010 – Last touched: Feb 16, 2010

Feb 16, 2010 18:54    

I am posting about the 'title_after' param but I think there may be other issues. I have been playing about with the <title> element to try and add some stock text along side the blog/page title. It seems this is harder than you think. My assumption was that if I take out the:

Code

'auto_pilot'          => 'seo_title',

I should be able to then just add the bits that I want to like:

PHP

<title><?php
        // ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
        request_titlearray(
            'title_after'         => 'Lee Woz Ere',
            'format'              => 'htmlhead',
        ) );
        // ------------------------------ END OF REQUEST TITLE -----------------------------
    ?></title>

The above works fine on pages and single posts but when viewing multiple posts you get nothing. Just an empty <title></title> element. Looking further into the code this is because the 'title_none' field is not set. Setting this to:

PHP

'title_none' => $Blog->dget('name','htmlhead')

Brings back the blog title but then doesn't respect the 'title_after' param (or any of them for that matter). This seems to be because at the end of the request title there is this:

PHP

elseif( !empty( $params['title_none'] ) )
    {
        $r $params['title_none'];
    }

Which just outputs the 'title_none' param and nothing else.

Oh, and on top of all this I can't see where the 'glue' param is used. If the 'glue' param is set to ' - ' shouldn't that be used in the title? In the above example should I not see:

<page title> - Lee Woz Ere

That doesn't seem to be happening for me :(

Cheers
Lee


Form is loading...

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