How do I NOT display a page title

More
14 years 4 months ago #1787 by status101
Hi, I hope this is the correct area to ask this question.

I am trying to NOT display the Page Title for a particular item, say for a 'single' item link used for the front page.

I can set the page title in the menu link, and/or in the item title. If I select NO in the menu link section, that turns off the page title coming from the menu link, however the 'item' title still displays.

I can obviously edit the item.php code for the category I am using and remove the code that displays the page title, but in looking at the code, it is looking at a switch somewhere

if ($this->params->get('show_title', 1)).... but I can’t seem to find the selectable option anywhere in the item or the category config. Where is the ‘show_title’ set??

I hope I have made sense and hope someone can point me in the right direction.

Many thanks in advance.

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

More
14 years 4 months ago #1791 by unleash.it
If I understand right and you want to show titles in a content type EXCEPT for one, how about just adding an exception to the IF statement? Test for the title and don't display it if it's the title in question.
Code:
if ($this->params->get('show_title', 1) && $title!='the title') { // display the title }

$title of course isn't the right variable name (not sure what it is and I don't have a copy of flexicontent nearby to look at the moment).

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

More
14 years 4 months ago #1801 by status101
Hi there, Thanks for coming back to me, and thank you for the advice.. that would work for the site I am working on now which is great.. but I guess I am asking a little bit different question.. ( which may be a silly one of course : )

Using the standard com_content in Joomla, you have the option to display the page title (or not) from both the Menu Item [Edit] page under Parameters (System) ( As you do as well with FlexiContent of course...) and from the Article [Edit] page under Parameters (Advanced), but this option is not able to be turned off/on, on a FlexiContent item (which amongst other things, I am using to replace the standard Articles on the site.)

I'll be honest... I didn't really understand why this was there in Joomla at first, however it does allow a certain amount of flexibility to have different values for page titles, browser bar titles, and breadcrumbs etc. For example, if I wanted "Welcome to our homepage" displayed page title for the home page, and "Home" in the breadcrumb..

When I looked at the code, I saw the bit I mentioned above, and it looks like it's checking the variable, so I am wondering if I am just missing a switch/radio button somewhere.. or perhaps I'm just not understanding why it is not available in FlexiContent.

The other thing I have noticed, is that the page title is rendered differently between a standard Joomla article ie: <h1 class="componentheading" for a standard Joomla article, and <h2 class="componentheading" for a FlexiContent item using the same template. This is not a 'problem' and there are obviously many things I can do to change/work around that for my 'Article' template, but should the page title not be displayed <h1 as standard... to be similar to the Joomla standard ( as is it not better SEOwise )

Anyway, even with all that said, I am still so wrapped with FlexiContent.. It is an amazing tool and am getting stuff done that I have never been able to do before.. So this is by no means a deal breaker ( in fact I am in the middle of 3 sites using it : ) but I am just trying to better understand the hows and whys.

Any thoughts, comments, read heres, etc would be greatly appreciated.

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

More
14 years 4 months ago #1809 by unleash.it
Welcome to Joomla's world of quirks :(

Actually, at the expense of simplicity you get flexibly, which is either a boon or a pain in the backside depending on your point of view...

Now keep in mind that I haven't delved in to Flexicontent all that much yet, so I don't know much of what's different then stock Joomla. At least with com_content menu items (probably the same with flexi), as you pointed out you have a choice of displaying article title(s) AND/OR Page Title, which is really supposed to be for making a custom meta title. If you're on the front page or a blog view, the Page Title is turned on by default... thus you get the famous "Welcome to Front Page" with the dummy content. You can turn it off in the parameters or rename it (by default it is what your html meta title would otherwise be).

In css class speak (unless you override the core output because you want better/tableless output), stock Joomla uses the class contentheading for articles and componentheading for the page title (you won't even see H1 or H2 unless you have a decent template, are using a different content component like Flixicontent, or you use the Beez overrides or something). As for Emmanuals choice of doing it, I agree... but I usually modify it. I like article titles to be H1 on individual article pages, but h2 on blog/list views because for good SEO you should only have one h1 per page.

I'm still not quite sure if I've answered your main question. With stock Joomla It depends if you have a single article or a blog. In the article itself, if you turn off "show article title" (I don't think there's "page title there) it should work on a solo article, but not in a blog/list as the parameter in the menu item is then honored. My guess is that Flexicontent works in the same way, although I'm not 100%.

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

More
14 years 1 week ago #6772 by swimminginthoughts
So, any solution to this? I don't want the home page on my site to display the title. I can't find a place (or definitive answer) anywhere on how to turn it off!

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

More
14 years 1 week ago #6792 by Rehne
sorry my english is not good
but if I understand you correctly
you can do the following:

In the template that you use (default, blog or your own one)
you need to insert something like this in the xml file
Code:
<param name="fc_tpl_show_page_title" type="list" default="0" label="Show Page Title" description="SHOW/HIDE THE PAGES TITLE"> <option value="">Use Global</option> <option value="0">Hide</option> <option value="1">Show</option> </param>

Then you can insert in the associated PHP file
following query
Code:
<!-- BOF page title --> <?php if (($this->params->get( 'show_page_title', 1 ) && $this->params->get('page_title') != $this->item->title) || ($this->params->get('fc_tpl_show_page_title') && $this->params->get('page_title') != $this->item->title)) : ?> <?php if (($this->params->get( 'show_page_title', 1 ) && $this->params->get('page_title') != $this->item->title) && ($this->params->get('fc_tpl_show_page_title') == "" )) : ?> <h1 class="componentheading"> <?php echo $this->params->get('page_title'); ?> </h1> <?php endif; ?> <?php if (($this->params->get('fc_show_page_title') == 1 ) && ($this->params->get('page_title') != $this->item->title)) : ?> <h1 class="componentheading"> <?php echo $this->params->get('page_title'); ?> </h1> <?php endif; ?> <?php endif; ?> <!-- EOF page title -->

so you can choose for each Catergory or item (Depending on where you have made the chanes)
whether and what kind of a Title displayed

I've done it in my template
www.flexicontent.org/forum/index ... c&start=10

Perhaps this is what you need

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

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