How to turn h2 tags into h1 on cattitle (title of category in category blog)

More
8 years 7 months ago #56948 by flodariege
Hello,

Thanks to this excellent thread: www.flexicontent.org/forum/20-general-su...tem-title-in-h1.html
I managed to modify the h2 tags of "contentheading" "fc_item_title" into a h1 tag.
Great.

Now I'm looking for a way to do the same with "cattitle", in order to get a h1 tag on the title of the category inside a category blog.
I've duplicated blog template and named it blog-h1.
Then I tried to copy-paste the content of:
/components/com_flexicontent/tmpl_common/category_category.php
into:
/components/com_flexicontent/templates/blog-h1h2/category_category.php
and edited the line (#28) :
<h2 class="cattitle">
<?php echo $this->escape($this->category->title); ?>
</h2>
to remplace h2 with h1 like this:
<h1 class="cattitle">
<?php echo $this->escape($this->category->title); ?>
</h1>

Just in case, I copy-paste too the content of:
/components/com_flexicontent/tmpl_common/category_category_html5.php
into:
/components/com_flexicontent/templates/blog-h1h2/category_category_html5.php
But could not find anything to change inside (just like in the item_html5.php for the default template).

But I still do not get a h1 tag on my category titles...
Would you have an idea of what I missed?

Thnak you for your help :)

Florence

Dare to dream, believe the unbelievable, never take no for an answer

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

More
8 years 7 months ago #56951 by ggppdk
inside category_category_html.php

did you find line:
Code:
$catTitleHeaderLevel = ( $this->params->get( 'show_page_heading', 1 ) && $this->params->get('show_cat_title', 1) ) ? '2' : '1';

and change it to
Code:
$catTitleHeaderLevel = '1';


-- 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
8 years 7 months ago - 8 years 6 months ago #56970 by flodariege
Until then, no I did not, but after your post, I did copy the content of:
tmpl_layout/category_category_html5.php
inside:
newblogtemplate/category_category_html5.php
And then replace the line #22 as you told me to.

I verified that category_category.php inside my new blog template is the one I modified yesterday, where I replaced the h2 tags by h1 tags.around the cattitle class...

... but still cannot have h1 tag on the category title...
I don't understand what I could have missed.


Thank you for your help.
Have a great sunday.
Regards from France,
Florence

Dare to dream, believe the unbelievable, never take no for an answer
Last edit: 8 years 6 months ago by flodariege.

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

More
8 years 6 months ago #57455 by flodariege
Well, since I could not get the right way to make it, I changed the parameters in order to hide the category title.
Then wrote down the title inside the description, between h1 tags, and that's it.

Dare to dream, believe the unbelievable, never take no for an answer

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.617 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