dynamic page title for joomla in chrono connectivity

347 views Asked by At

I am newbie in joomla and using chrono connectivity component for the inner pages. I want to provide dynamic page title and description for each page which has single template. There is an option in backend where we can set the page title under:

components->chrono connectivity->connections management->connection id->general->header/title of administrator panel.

But it accepts only default page title and description. Instead I need to give my product title and description dynamically.

can anyone help me..thanks in advance..

1

There are 1 answers

0
Athipatla On BEST ANSWER

As there is no component or plugin available for joomla 1.5 version. Either create a custom module or add a hack to the code like below in components->com_chronoconnectivity->chronoconnectivity.html.php

if( trim($MyConnection->connectionparams('heading')) ){
    $document =& JFactory::getDocument();
    if((isset($_REQUEST['connectionname'])) && ($_REQUEST['connectionname'] == 'yourconnectionname') && (isset($_REQUEST['id']))) {
        $query = "SELECT *  FROM  `table_name`  WHERE `id` =".$_REQUEST['id'].";";
        $database->setQuery($query);
        $chronaconnectivity = $database->loadObject();
        $document->setTitle($chronaconnectivity->title);            
    }else{
        $document->setTitle($MyConnection->connectionparams('heading'));
    }
}

instead of below

if( trim($MyConnection->connectionparams('heading')) ){
    $document =& JFactory::getDocument();
    $document->setTitle($MyConnection->connectionparams('heading'));
}