-
AuthorPosts
-
May 17, 2011 at 9:43 pm #164126
Hello,
We are trying to tweak a design slightly and would require to insert the page title into the body ID attribute (so that we can separate CSS for the body for each page). However we can find no documentation for JAT3 for this and the original Joomla functions do not appear to be functioning.
Can someone please spell out the PHP code needed to retrieve the page title? For usage in “plugins/system/jat3/jat3/base-themes/default/page/default.php”.
Thank you in advance.
LP,
Jurethangnn1510 Friendthangnn1510
- Join date:
- October 2014
- Posts:
- 1608
- Downloads:
- 0
- Uploads:
- 80
- Thanks:
- 73
- Thanked:
- 278 times in 256 posts
May 19, 2011 at 10:07 am #391952Hi Jure!
Please try this code:
$mydoc =& JFactory::getDocument();
$title = $mydoc->getTitle();
To get page title.
May 21, 2011 at 9:42 pm #392285<em>@thangnn1510 241371 wrote:</em><blockquote>Hi Jure!
Please try this code:
$mydoc =& JFactory::getDocument();
$title = $mydoc->getTitle();
To get page title.</blockquote>
Thanks for trying to help but I get blank, much like on my previous attempts with similar code.
LP,
JureJune 13, 2011 at 10:04 am #396070Have you figured it out?
I have the exact same problem. Only get blank when I try that code. I have installed stalytics2 on my joomla1.6 installation. They use $document = &JFactory::getDocument();
$title = $document->getTitle();to get the title and store it in the db. All posts that should contain the title is blank. I have tried to add som text after the call and it works just fine and is being stored in the db as ” – extra text after the title”, but the title is missing.
$document = &JFactory::getDocument();
$title = $document->getTitle() . ‘ – extra text after the title’ ;This seems to be a jat3-problem since the call works just fine when I try stalytics in a non jat3-installation.
Anyone else that have a solution???
thangnn1510 Friendthangnn1510
- Join date:
- October 2014
- Posts:
- 1608
- Downloads:
- 0
- Uploads:
- 80
- Thanks:
- 73
- Thanked:
- 278 times in 256 posts
June 14, 2011 at 3:22 am #396191<em>@peterbe 246705 wrote:</em><blockquote>Have you figured it out?
I have the exact same problem. Only get blank when I try that code. I have installed stalytics2 on my joomla1.6 installation. They use $document = &JFactory::getDocument();
$title = $document->getTitle();to get the title and store it in the db. All posts that should contain the title is blank. I have tried to add som text after the call and it works just fine and is being stored in the db as ” – extra text after the title”, but the title is missing.
$document = &JFactory::getDocument();
$title = $document->getTitle() . ‘ – extra text after the title’ ;This seems to be a jat3-problem since the call works just fine when I try stalytics in a non jat3-installation.
Anyone else that have a solution???</blockquote>
Could you PM me the site links and info (FTP/Admin account) of your site for further check?
June 18, 2011 at 6:20 am #397082Hello,
<em>@thangnn1510 246859 wrote:</em><blockquote>Could you PM me the site links and info (FTP/Admin account) of your site for further check?</blockquote>
We’d be willing to give you access. Please advise as to where to send login credentials and such.
LP,
Jurethangnn1510 Friendthangnn1510
- Join date:
- October 2014
- Posts:
- 1608
- Downloads:
- 0
- Uploads:
- 80
- Thanks:
- 73
- Thanked:
- 278 times in 256 posts
June 20, 2011 at 2:20 am #397263Hi Jure!
Please give us the login information FTP/Admin account to your support ticket NST-449-37764 in http://support.joomlart.com. We’ll check for you. Thanks.
thangnn1510 Friendthangnn1510
- Join date:
- October 2014
- Posts:
- 1608
- Downloads:
- 0
- Uploads:
- 80
- Thanks:
- 73
- Thanked:
- 278 times in 256 posts
June 21, 2011 at 3:57 am #397530I have tried this code:
$mydoc =& JFactory::getDocument();
$title = $mydoc->getTitle();
echo $title;for you in templates/ja_droid/html/com_content/article/default.php and the page title shown:
http://s07.denia.si/index.php?option=com_content&view=article&id=96&Itemid=504
Please check and confirm me.
Thanks.
filmlover Friendfilmlover
- Join date:
- March 2013
- Posts:
- 14
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 3
- Thanked:
- 2 times in 1 posts
May 22, 2013 at 4:23 pm #493652<em>@thangnn1510 241371 wrote:</em><blockquote>Hi Jure!
Please try this code:
$mydoc =& JFactory::getDocument();
$title = $mydoc->getTitle();
To get page title.</blockquote>
In Joomla 3, this works for the “Browser Page Title”. What code do I use to get the “Page Heading”?
phong nam Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
May 23, 2013 at 8:21 am #493723Hi,
<blockquote>In Joomla 3, this works for the “Browser Page Title”. What code do I use to get the “Page Heading”?</blockquote>
It is located in templatesja_templateshtmlcom_contentarticledefault.php at lines:<?php if ($this->params->get('show_page_heading', 1)) : ?>
<h1 class="componentheading">
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>Leo
filmlover Friendfilmlover
- Join date:
- March 2013
- Posts:
- 14
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 3
- Thanked:
- 2 times in 1 posts
May 23, 2013 at 2:23 pm #493748<em>@Leo Burnetts 373983 wrote:</em><blockquote>Hi,
It is located in templatesja_templateshtmlcom_contentarticledefault.php at lines:
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<h1 class="componentheading">
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>Leo</blockquote>
Hi Leo,
I’m using t3_blank and that code didn’t work. Neither did the code I found in “plugins/system/t3/base/html/com_content/article/default.php”:
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<div class="page-header clearfix">
<h1 class="page-title"><?php echo $this->escape($this->params->get('page_heading')); ?></h1>
</div>
<?php endif; ?>
<div class="item-page<?php echo $this->pageclass_sfx?> clearfix">Thanks for your quick reply! Any other suggestions?
filmlover
filmlover Friendfilmlover
- Join date:
- March 2013
- Posts:
- 14
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 3
- Thanked:
- 2 times in 1 posts
May 26, 2013 at 3:15 pm #493987Hi Leo,
Found the answer to the “page_heading” here: http://forum.joomla.org/viewtopic.php?f=642&t=672186
?php
$menu = &JSite::getMenu();
$active = $menu->getActive();
$menuname = $active->params->get('page_heading');
echo $menuname;
?>1 user says Thank You to filmlover for this useful post
-
AuthorPosts
This topic contains 12 replies, has 5 voices, and was last updated by filmlover 11 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum