nwrightau VIP
Total posts: 99
19 Сен 2014 06:14

Hi,

How do I remove the section name from the page title?

I've turned it off in section settings yet it still appears.

Thanks

Последние изменения: 26 Окт 2014


nwrightau VIP
Total posts: 99
26 Сен 2014 09:46

Sergey It is in many places. It is generated based on condition. For example we have personolised sections and we are in home pages of different users, then title have to be different. Otherwhise when you see title when type URL you do not know the difference.

FOr example you say that section name have not to be there. But then title may be the same in different sections.

This is complicated issue it also affects PR of the page.

But you can hack it in views/records/view.html.php.

Thanks I will have a look at the hack. Surely an off switch is in order so the section name isn't forced in the title? It's odd this doesn't happen with any other sections only 1.


nwrightau VIP
Total posts: 99
26 Сен 2014 10:02

views/records/view.html.php - line 416, comment that out and it goes away. just need to hook that up to a switch and would make it much more user friendly.

Still odd that it only did this on one section none of the others. Same configuration that I can see.


pepperstreet VIP
Total posts: 3,837
26 Сен 2014 23:53

pepperstreet

grindstone How do I remove the section name from the page title

Browser page title Or Page Header (inside content) ?

Have asked for clarification in the first comment. Mmh, we might have saved some time and comments then ;)

On the other hand, we have found the other title bug in page header.
And I do agree with the browser page title, it should be configurable. Not forced in view.html.php


nwrightau VIP
Total posts: 99
26 Сен 2014 23:57

pepperstreet

pepperstreet

grindstone How do I remove the section name from the page title

Browser page title Or Page Header (inside content) ?

Have asked for clarification in the first comment. Mmh, we might have saved some time and comments then ;)

On the other hand, we have found the other title bug in page header.

And I do agree with the browser page title, it should be configurable. Not forced in view.html.php

Sorry for not clarifying - browser page title.


pepperstreet VIP
Total posts: 3,837
27 Сен 2014 11:54
FYI - Page Title

Easy FrontEnd SEO allows to create and modify all page information / meta-data. (but might add an addtional SQL query, please check advanced parameters and storage options etc.)


pepperstreet VIP
Total posts: 3,837
26 Окт 2014 03:28

nwrightau browser page title

Actually, you might change any page header and browser title in a Cobalt custom markup template. Or any other template. So, no core or view hack should be needed.

Example:

$document = JFactory::getDocument();
$document->setTitle('My Custom Browser Title ');

For page header in content see file default_ markup_default.php

Modify it to your liking:

<!------------------------------ Show page header ------------------------------------>

<!-- If section is personalized load user block -->
<?php if(($this->section->params->get('personalize.personalize') && $this->input->getInt('user_id')) || $this->isMe):?>
    <?php echo $this->loadTemplate('user_block');?>


<!-- If title is allowed to be shown -->
<?php elseif($markup->get('title.title_show')):?>
    <div class="page-header">
        <?php if(in_array($this->section->params->get('events.subscribe_category'), $this->user->getAuthorisedViewLevels()) && $this->input->getInt('cat_id')):?>
            <div class="pull-right">
                <?php echo HTMLFormatHelper::followcat($this->input->getInt('cat_id'), $this->section);?>
            </div>
        <?php elseif(in_array($this->section->params->get('events.subscribe_section'), $this->user->getAuthorisedViewLevels())):?>
            <div class="pull-right">
                <?php echo HTMLFormatHelper::followsection($this->section);?>
            </div>
        <?php endif;?>
        <h1>
            <?php echo $this->escape(JText::_($this->title)); ?>
            <?php if($this->category->id):?>
                <?php echo CEventsHelper::showNum('category', $this->category->id, TRUE);?>
            <?php else:?>
                <?php echo CEventsHelper::showNum('section', $this->section->id, TRUE);?>
            <?php endif;?>
        </h1>
    </div>


<!-- If menu parameters title is set -->
<?php elseif ($this->appParams->get('show_page_heading', 0) && $this->appParams->get('page_heading', '')) : ?>
    <div class="page-header">
        <h1>
            <?php echo $this->escape($this->appParams->get('page_heading')); ?>
        </h1>
    </div>
<?php endif;?>

Jeff VIP
Total posts: 745
26 Окт 2014 03:54

pepperstreet Actually, you might change any page header and browser title in a Cobalt custom markup template. Or any other template. So, no core or view hack should be needed.

+1


nwrightau VIP
Total posts: 99
26 Окт 2014 22:28

Thanks pepper street looks like a better solution, for something like this there should be a simple off switch in the component though.

Работает на Cobalt