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.074 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started