Keyword

Feature Request? Seperate "title" param for Tag view

  • harikaram
  • harikaram's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 3 months ago #84801 by harikaram
Right now, the category listing page and "generic" views share the same parameter...Actually, where does ($this->params->get('page_title')) pull from if the Tag page isnt linked to any menu item?  Maybe its defaulting to 0?

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #84802 by Simon Wells
Hi Hari,

Which parameter are they sharing?
What are you trying to achieve with ($this->params->get('page_title') ?

It will help me understand what you need to achieve.

Simon
K2 Support

Please Log in or Create an account to join the conversation.

  • harikaram
  • harikaram's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 3 months ago #84803 by harikaram
Sorry....

$this->params->get('page_title') is part of generic.php, towards the top; part of the conditional that determines whether it prints the page title.

Normally I believe it comes from the settings for a k2 category. I dont think there is a "title" show/hide attrib in the global prefs. So I'm wondering where this param pulls from when you are viewing the a Tag View page...

The reason I came across it is that I have a category list view for my homepage on which I've disabled page title. When I click a tag for an article, the resultant page is also missing its page title, though here I'd prefer to have it ("Viewing articles by tags: MyTag")

thanks for the help Simon...

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #84804 by Wire Creative
Replied by Wire Creative on topic Feature Request? Seperate "title" param for Tag view
Hi, I found a sort of solution for this, but it may have negative consequences down the line.

 

As far as I can tell, the only way to get the view-item-by-tag page to display a page title, is to remove the following code from within the conditional statement:

<?php if($this->params->get('show_page_title')): ?>    <!-- Page title -->    <div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>">        <?php echo $this->escape($this->params->get('page_title')); ?>    </div>    <?php endif; ?>


 

I just moved beginning of the conditional statement, like this:

    <!-- Page title -->    <div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>">        <?php echo $this->escape($this->params->get('page_title')); ?>    </div><?php if($this->params->get('show_page_title')): ?>    <?php endif; ?>


And now there's a page title, because the non-existent condition does not apply to this code.

Of course, this means I can never use the parameters to turn off the page title from the generic view, but it works for now.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #84805 by Odin Mayland
Replied by Odin Mayland on topic Feature Request? Seperate "title" param for Tag view
Thank you wirecreative for your solution.

 

I might be missing it, but where can I change the default title of "Displaying items by tag:"

 

Here is an example page:  www.primocraft.com/tag/commercial.html

 

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #84806 by Odin Mayland
Replied by Odin Mayland on topic Feature Request? Seperate "title" param for Tag view
Where can I change the default title of "Displaying items by tag:"

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #84807 by Odin Mayland
Replied by Odin Mayland on topic Feature Request? Seperate "title" param for Tag view
I might have found one issue.  If I enable JCH_Optimize the title "Displaying items by tag:" does NOT show at all.

I haven't figured out why yet.
wirecreative said:

Hi, I found a sort of solution for this, but it may have negative consequences down the line.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #84808 by Odin Mayland
Replied by Odin Mayland on topic Feature Request? Seperate "title" param for Tag view
I found it in /components/com_k2/views/itemlist/view.html.php

modernmagic said:
Where can I change the default title of "Displaying items by tag:"

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #84809 by Odin Mayland
Replied by Odin Mayland on topic Feature Request? Seperate "title" param for Tag view
I just figured it out.  If you enable JCH to "Minify HTML" then the 

"Displaying items by tag:" will not appear.

modernmagic said:
I might have found one issue.  If I enable JCH_Optimize the title "Displaying items by tag:" does NOT show at all.

I haven't figured out why yet. wirecreative said:

Hi, I found a sort of solution for this, but it may have negative consequences down the line.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum