Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • ꦯꦸꦕꦶ ꦏꦸꦂꦤꦶꦲꦮꦤ꧀ Friend
    #158208

    Dear JA Folks,

    I wanted to add a custom title page for the T3 template I’m going to build, I know there are extensions out there capable of doing this, but I intended to incorporate this to the template.

    I was looking to the plugins/system/jat3/base-themes/default/page/default.php
    and make a copy to my template’s folder
    I succeeded to add the $this->setGenerator(‘the new Generator’);
    but I found no luck when I tried to set the page title

    On this issue, I found it easier with the T3 v1 though, ‘coz I can directly add it to the layout I used 😉

    Thanks beforehand for the help

    robert vining Friend
    #369865

    From what I see on the Joomla.org docs… it’s the same way, just use setTitle instead:

    http://docs.joomla.org/API15:JDocument/setTitle

    Robert Vining
    www.joompro.com

    thuanlq Friend
    #369947

    Hi @nawainruk,
    You can try add some lines code on “default.php” file


    $document = & JFactory::getDocument();
    $document->setTitle($document->getTitle() . ' - my custom head tag');

    If it does not resolve your issues, you can create a simple system plugin with event “onAfterDispatch”, in your plugin file add function


    function onAfterDispatch() {
    global $mainframe;

    $document = & JFactory::getDocument();
    $docType = $document->getType();
    // Only mod site pages that are html docs (no admin, install, etc.)
    if ( !$mainframe->isSite() ) return;
    if ( $docType != 'html' ) return;
    $your_custom_title = "Input your custom title here";

    $document->setTitle( $document->getTitle() . ' - ' . $your_custom_title. ' - '. $mainframe->getCfg('sitename') );
    return true;
    }

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 3 voices, and was last updated by  thuanlq 13 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum