-
AuthorPosts
-
October 13, 2011 at 8:05 am #169618
I have problem to change dynamicly TITLE of the logo href in the top of the page. In purityII same code work. I paste code below:
Original Header code is:
$app = & JFactory::getApplication();
$siteName = $app->getCfg('sitename');
if ($this->getParam('logoType', 'image')=='image'): ?>
<h1 class="logo">
<a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a>Modified code is:
$app = & JFactory::getApplication();
$siteName = $app->getCfg('sitename');
$title = $this->getTitle();
$myabsoluteurl=JURI::base();
if ($this->getParam('logoType', 'image')=='image'): ?>
<h1 class="logo">
<a href="<?php $myabsoluteurl ?>" title="<?php echo $title; ?>"><span><?php echo $title; ?></span></a>$myabsoluteurl working, but $title doesn’t work. Anyone have some ideas?
chavan Friend
chavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
October 16, 2011 at 6:53 am #419608you are right with the
JURI::base()
and the Logo title and the name should be Sitename.
May I know why do you want each and every page title to be assigned on logo. can you explain me this.
October 16, 2011 at 4:08 pm #419668My title on the site is: Article | Sitename . I do it for SEO
chavan Friend
chavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
October 16, 2011 at 4:16 pm #419669ok, can you tell me do you have any issues on this for us to fix it.
October 17, 2011 at 10:01 am #419754$title = $this->getTitle(); – this code dont work on this JA template . I make tests with PurityII and there working.
If this work, my title of the logo must be : Title of current page , but when i put this code the generated title tag is “”. This is my problem – code below dont work.
I attach screen with working code in purityII: “Corect title of the site” is the title of the page.
chavan Friend
chavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
October 17, 2011 at 4:35 pm #419813Post your Site url , admin details and ftp details. to check the issue.
chavan Friend
chavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
October 18, 2011 at 3:58 am #419901Try this Code for getting the title:
global $mainframe;
$page_title = $mainframe->getPageTitle();Note: If you Find my Post useful please click on the Thanks Icon
October 18, 2011 at 6:41 am #419932And this code dont work :((
AuthorPostsViewing 8 posts - 1 through 8 (of 8 total)This topic contains 8 replies, has 2 voices, and was last updated by
peterpetrov 13 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Dynamic HREF title on logo
Viewing 8 posts - 1 through 8 (of 8 total)