Transform h2 item title in h1

More
9 years 8 months ago #48781 by Laurentfrom47
Hello, what is the best practise to transform the h2 item title tag in h1 item tag with the item view ?
It is better for SEO.
Code:
<h2 class="contentheading"> <span class="fc_item_title">Item Title</span> </h2>
Code:
<h1 class="contentheading"> <span class="fc_item_title">Item Title</span> </h1>
Thanks.

Perhaps this can be a feature in the settings.

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

More
9 years 8 months ago #48785 by Rooney
Hi, just edit your FC template!
Roony

Joomla! 3.9.24 and FC 3.3.9

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

More
9 years 8 months ago #48794 by Laurentfrom47
Hi, thanks ok but for the default template you need to edit the modular.php file in /components/com_flexicontent/tmpl_common/item_layouts folder but there is a setting <h'.$itemTitleHeaderLevel; ?> and i don't know where is this setting
Code:
<!-- BOF item title --> <?php echo '<h'.$itemTitleHeaderLevel; ?> class="contentheading"><span class="fc_item_title"> <?php echo ( mb_strlen($item->title, 'utf-8') > $this->params->get('title_cut_text',200) ) ? mb_substr ($item->title, 0, $this->params->get('title_cut_text',200), 'utf-8') . ' ...' : $item->title; ?> </span><?php echo '</h'.$itemTitleHeaderLevel; ?>> <!-- EOF item title -->

thanks

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

More
9 years 8 months ago #48808 by ggppdk
Hello

near to of the file the should be a line like this:

$itemTitleHeaderLevel = '2';


so search for:

"$itemTitleHeaderLevel ="


-- 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
9 years 6 months ago #50180 by esinet
Thanks for this help.
I find how to change it in modular.php
But is there something to change in modular_html5.php (it's not so easy to understand what i need to change in the code )
Code:
$itemTitleHeaderLevel = ( $this->params->get( 'show_page_heading', 1 ) && $this->params->get('page_heading') != $item->title && $this->params->get('show_title', 1) ) ? '2' : '1';

And must i take care of this change in next update of flexicontent.
Thanks a lot

Joomla 3.9.14 /3.6.5 FLEXIcontent v 3.3.1.6

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

More
9 years 6 months ago #50200 by micker
no no ...
1 duplicate blog template
2 edit your item_html5.php
3 remove all and copy past modular_html5.php inside item_html5.php
4 do your modification
=> now you can update without any problem
don't touch to original template

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

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