Text Size

Members login

User Rating: / 2
PoorBest 

Recommend Print

Item title before category title

  • Published by
    Georgios Papadakis
  • Last modified
    24 January 2012
  • Up to date
    Yes
  • Profile concerned
    Developer
  • Concerns
    Component
  • Since Version
    1.5.6
  • Voting
    (2 votes)
  • Favourites
    Add to favourites
-- The setting of page_title is inside file
component/com_flexiconent/views/items/view.html.php
This file is not overridable.

-- But you can copy code from the above file inside your template file:
component/com_flexiconent/templates/mytmpl/item.php
and change it e.g.
$cid      = JRequest::getInt('cid', 0);
 
// Get item data
$item    = & $this->item;
$params = & $this->params;
$cats      = new flexicontent_cats($cid);
$parents   = $cats->getParentlist();
$document    = & JFactory::getDocument();
$menus      = & JSite::getMenu();
$menu       = $menus->getActive();
 
if ($params->get('override_title', 0)) {
  if ($params->get('custom_ititle', '')) {
    $params->set('page_title',   $params->get('custom_ititle'));            
  } else {
    $params->set('page_title',   $item->title);
  }
} else {
  // Get the menu item object      
  if (is_object($menu)) {
    $menu_params = new JParameter( $menu->params );
    if (!$menu_params->get( 'page_title')) {
      $params->set('page_title',   $item->title);
    }
  } else {
    $params->set('page_title',   $item->title);
  }
}
 
 /*
* Create the document title
* * First is to check if we have a category id, if yes add it. * If we haven't one than we accessed this screen direct via
* the menu and don't add the parent category
*/
if($cid && $params->get('addcat_title', 1) && (count($parents)>0)) { $parentcat = array_pop($parents); $doc_title = $params->get( 'page_title' ) . (isset($parentcat->title) ? ' - '.$parentcat->title:""); } else { $doc_title = $params->get( 'page_title' ); }  $document->setTitle($doc_title);

-- Effectively the above code sets the title again.If you need further change title then edit these are the final lines:
if (...) {
  $doc_title = ...;
} else {
  $doc_title = ...;
}

 


Community

ggppdk : Online 193 mins yaK2manD : Online 310 mins xhyman : Online 416 mins netcoupe : Online 27253 mins
Members Online: 4

Latest Comments

Latest Forum Posts

Posted by yaK2manD - 17/05/2012 17:51
Posted by ggppdk - 17/05/2012 17:47
Posted by yaK2manD - 17/05/2012 17:41
Posted by algardata - 17/05/2012 16:45
Posted by yaK2manD - 17/05/2012 14:56
Posted by ggppdk - 17/05/2012 14:44