Sitename in Page title

Admiror Gallery is free extension for Joomla! 1.6. Joomla! 1.7 and Joomla! 2.5 based websites. Admiror Gallery is all in one, a simple and instant solution for rendering image gallery from folder with images, but very flexible and adaptable.
Post Reply
Message
Author
bbdoc
Maegashira
Maegashira
Posts: 13
Joined: Sun Jun 23, 2013 10:40 am

Sitename in Page title

#1 Post 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

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Sitename in Page title

#2 Post 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>';
Help Admiror Gallery become even better,
give us a review on JED

bbdoc
Maegashira
Maegashira
Posts: 13
Joined: Sun Jun 23, 2013 10:40 am

Re: Sitename in Page title

#3 Post 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;

?>

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Sitename in Page title

#4 Post 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 :

Code: Select all

$article = new JObject();
Help Admiror Gallery become even better,
give us a review on JED

bbdoc
Maegashira
Maegashira
Posts: 13
Joined: Sun Jun 23, 2013 10:40 am

Re: Sitename in Page title

#5 Post 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

Admiror Gallery 5 - Fundraising Campaign

Post Reply