Welcome, Guest
Username: Password: Remember me

TOPIC: Parameter show_page_heading ignored?

Parameter show_page_heading ignored? 10 Mar 2015 23:14 #12882

  • Ferm
  • Ferm's Avatar
  • Offline
  • Junior Member
  • Posts: 39
  • Thank you received: 6
  • Karma: 2
When I add a view from a J-cook component to a menu, the menu component gives me the option to hide the page heading (under the tab "page display" in Joomla 3.4).

This sets the parameter show_page_heading to 0 or 1. Show_page_heading is then added to the view object under params, so $view->params->show_page_heading, by the function $view->_prepareDocument()

However, the function generated to display a layout (for example displayDefault()) in veiw.html.php, contains the line

$this->title = $this->params->get('page_heading');

This sets the title to the page heading regardless of whether show_page_heading is true or not.

Wouldn't it make sense to only set the title if the parameter show_page_heading is true? So

if($this->params->get('show_page_heading'))
$this->title = $this->params->get('page_heading');

I think this would be consistent with normal Joomla functionality such as com_content.
The administrator has disabled public write access.

Parameter show_page_heading ignored? 17 May 2015 09:23 #13002

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
After checking, this is working correctly.

If you want to check it, the code is in
layouts/title.php

It has been improved since 2.6.6
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.054 seconds

Get Started