Page 1 of 1
Sitename in Page title
Posted: Sun Jul 14, 2013 10:39 am
by bbdoc
Hi,
I've configured my Joomla website so that it adds my website's name in all pages title (SEO parameters in global config)... Unfortunately, Admiror doesn't seem to take this parameter into account.
How can I get this added ?
Thanks
Re: Sitename in Page title
Posted: Thu Jul 18, 2013 5:29 pm
by Vasiljevski
You could add this by a simple fix, open components\com_admirorgallery\views\layout\tmpl\default.php and change the line: 44
Code: Select all
$article->text = '<h1>'.JSite::getMenu()->getActive()->params->getValue('page_title').'</h1>';
to
Code: Select all
$article->text = '<h1> [Your site name] '.JSite::getMenu()->getActive()->params->getValue('page_title').'</h1>';
or add
Code: Select all
$app = JFactory::getApplication();
$article->text = '<h1>'. $app->getCfg('sitename').JSite::getMenu()->getActive()->params->getValue('page_title').'</h1>';
Re: Sitename in Page title
Posted: Tue Jul 23, 2013 1:15 pm
by bbdoc
Hi,
I don't see that line in my default.php... Here is what I see :
Code: Select all
<?php
/*------------------------------------------------------------------------
# com_admirorgallery - Admiror Gallery Component
# ------------------------------------------------------------------------
# author Igor Kekeljevic & Nikola Vasiljevski
# copyright Copyright (C) 2011 admiror-design-studio.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.admiror-design-studio.com/joomla-extensions
# Technical Support: Forum - http://www.vasiljevski.com/forum/index.php
# Version: 4.5.0
-------------------------------------------------------------------------*/
// No direct access
defined('_JEXEC') or die('Restricted access');
$ag_inlineParams='';
$ag_inlineParams.=' template="'.$this->template.'"';
$ag_inlineParams.=' thumbWidth="'.$this->thumbWidth.'"';
$ag_inlineParams.=' thumbHeight="'.$this->thumbHeight.'"';
$ag_inlineParams.=' thumbAutoSize="'.$this->thumbAutoSize.'"';
$ag_inlineParams.=' arrange="'.$this->arrange.'"';
$ag_inlineParams.=' newImageTag="'.$this->newImageTag.'"';
$ag_inlineParams.=' newImageDays="'.$this->newImageDays.'"';
$ag_inlineParams.=' frameWidth="'.$this->frameWidth.'"';
$ag_inlineParams.=' frameHeight="'.$this->frameHeight.'"';
$ag_inlineParams.=' showSignature="'.$this->showSignature.'"';
$ag_inlineParams.=' plainTextCaptions="'.$this->plainTextCaptions.'"';
$ag_inlineParams.=' popupEngine="'.$this->popupEngine.'"';
$ag_inlineParams.=' backgroundColor="'.$this->backgroundColor.'"';
$ag_inlineParams.=' foregroundColor="'.$this->foregroundColor.'"';
$ag_inlineParams.=' highliteColor="'.$this->highliteColor.'"';
// Albums Support
$ag_inlineParams.=' albumUse="'.$this->albumUse.'"';
// Paginations Support
$ag_inlineParams.=' paginUse="'.$this->paginUse.'"';
$ag_inlineParams.=' paginImagesPerGallery="'.$this->paginImagesPerGallery.'"';
JPluginHelper::importPlugin( 'content' );
$article = new JObject();
$article->text = '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';
$article->id = 0;
$limitstart = 0;
$dispatcher = JDispatcher::getInstance();
$results = $dispatcher->trigger('onContentPrepare', array ( &$context, &$article, & $params, $limitstart));
echo $article->text;
?>
Re: Sitename in Page title
Posted: Wed Jul 24, 2013 6:13 pm
by Vasiljevski
Hmm yes, the one I'm talking about is not released yet

OK, add this:
Code: Select all
$app = JFactory::getApplication();
$menu = $app->getMenu();
//Display page heading
if($menu->getActive()->params->getValue('show_page_heading'))
{
$article->text = '<h1>'.$app->getCfg('sitename').$menu->getActive()->params->getValue('page_title').'</h1>';
}
After :
Re: Sitename in Page title
Posted: Thu Jul 25, 2013 9:38 am
by bbdoc
Still doesn't work...
I've added :
Code: Select all
//Display page heading
if($menu->getActive()->params->getValue('show_page_heading'))
{
$article->text = '<h1>'.$app->getCfg('sitename').$menu->getActive()->params->getValue('page_title').'</h1>';
}
else
{
$article->text = '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';
}
.. so I make sure $article->text has a value whatever the global parameter is, but it looks it takes the "else" all the time... altough parameter is set to show name site in title.
The parameter I'm talking about is in global site configuration in joomla (Sitename in title), and can be set to Before/After/None (sorry if it's not exactly the correct naming, my install being in French...).
Thanks