How to use Alternative Page Title (meta) as category title

More
12 years 3 months ago #27665 by pabro
Hi,

if i set an alternative page title in metadata of category, it dont have an effect on frontend. I want to change in frontend the headline (h2) of category "Homepage" (the categroy should named as "Hompage" in backend for administration, but in frontend display an different title.).
Attachments:

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

More
12 years 3 months ago #27666 by ggppdk
This title is meant to appear only inside as meta data title, right? also i by reading the description i think we should also use it inside the title tag, but not as page header title, for this purpose it is always the category tile , and i suggest that you change the category title ...

But you can do what you ask:

-- The h2 always contains the category title,
Code:
<h2 class="cattitle"> <?php echo $this->escape($this->category->title); ?> </h2>

and it is inside file category_category.php
you could duplicate the template that you use for this category (not to change one of the standard templates !!!)
and try replacing the above with:
Code:
<h2 class="cattitle"> <?php echo JFactory::getDocument()->getMetaData('title'); ?> </h2>

If you do not set the meta data title then the above will contain and print the category title

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 3 months ago #27690 by ggppdk
I see now, that this was removed from J2.5 categories parameters, so i think to drop it, is it really needed?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 3 months ago #27710 by pabro
There are also no changes in metadata ... but, its not important. I can also replace the title in template or insert with module or so on ;)

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.765 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline