Display menu item title in item view

More
10 years 3 months ago #53067 by juansolos
Hello,
i have a menu item type category blog.
I search for display the menu item title (h1 componentheading) in the item view of this category before the item title (h2).

Regards

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

More
10 years 3 months ago #53081 by ggppdk
Hello

-- Copy the code of
components/com_flexicontent//tmpl_common/item_layouts/modular(_html5).php

inside the
item(_html5).php
of your template
components/com_flexicontent/templates/myTEMPLATEname/


The code to customize is at the top of the file:

Code:
$page_heading_shown = $this->params->get( 'show_page_heading', 1 ) && $this->params->get('page_heading') != $item->title; // Main container $mainAreaTag = 'div'; // SEO, header level of title tag $itemTitleHeaderLevel = '2'; // SEO, header level of tab title tag $tabsHeaderLevel = $itemTitleHeaderLevel == '2' ? '3' : '2'; $page_classes = 'flexicontent'; $page_classes .= $this->pageclass_sfx ? ' page'.$this->pageclass_sfx : ''; $page_classes .= ' fcitems fcitem'.$item->id; $page_classes .= ' fctype'.$item->type_id; $page_classes .= ' fcmaincat'.$item->catid;


As you can see default is <H2>
Code:
$itemTitleHeaderLevel = '2';


-- 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
10 years 3 months ago #53093 by juansolos
Hello,
In my template i have
Code:
<h1 class="componentheading"> <?php echo $this->params->get('page_heading'); ?> </h1>
And a h2 tag for the itme title.

But i would like to show the menu item title in the h1 tag and item title in the h2 tag.

But h1 et h2 show my item title.

I tink it is a wrong config from me but i cant find where to display the menu title (category view) i come from in the itme view.

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

More
10 years 3 months ago #53123 by ggppdk
Hello


Our built-in template will show the
-- page_heading parameter ... or the menu title


if
$page_heading_shown =
$this->params->get( 'show_page_heading', 1 ) &&
$this->params->get('page_heading') != $item->title;




-- also NOTE: there is a check that the current menu item points to current item of item view otherwise it will not be used



-- please test with a default template and then update your template code



if you have
- checked the above if menu item points to current item in item view and you have tested with default menu item, and the "show page heading" is ON in the menu item, then i could have a look at it


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.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.644 seconds
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
Save