test
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • lupus664 Friend
    #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,
    Jure

    thangnn1510 Friend
    #391952

    Hi Jure!

    Please try this code:


    $mydoc =& JFactory::getDocument();
    $title = $mydoc->getTitle();

    To get page title.

    lupus664 Friend
    #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,
    Jure

    peterbe Friend
    #396070

    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???

    thangnn1510 Friend
    #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?

    lupus664 Friend
    #397082

    Hello,

    <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,
    Jure

    thangnn1510 Friend
    #397263

    Hi 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 Friend
    #397530

    I 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 Friend
    #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 Friend
    #493723

    Hi,

    <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 Friend
    #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 Friend
    #493987

    Hi 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;
    ?>

Viewing 12 posts - 1 through 12 (of 12 total)

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