Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • Ferm
  • Ferm's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 39
  • Thank you received: 6
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.

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

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

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

  • Page:
  • 1
Time to create page: 0.072 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started