darkroast
Member
I was looking for a way to print the menu item title as the heading for the list, rather than the list name itself. I found this post, which helped:
http://fabrikar.com/forums/showthread.php?t=29512
After looking through the code for the Bootstrap template, I saw that there's a section which can generate this. It's located in lines 12-18 (of the current template, anyway), which are:
I changed it to:
and that added the menu item text as the heading.
However, I also noted that this doesn't respect the setting of the show-title parameter; no matter whether I have the Show Title option on or off - or whether I have the Show Page Heading on or off for the menu item itself - it always shows. So it seems like that show-title parameter isn't getting used correctly.
This sounds like something which might be worth adding to the Bootstrap template. Here's how I (possibly) see this working:
Does that sound like something doable? I think that would be a great addition. In fact, the same behavior could apply to forms as well.
http://fabrikar.com/forums/showthread.php?t=29512
After looking through the code for the Bootstrap template, I saw that there's a section which can generate this. It's located in lines 12-18 (of the current template, anyway), which are:
Code:
if ($this->params->get('show-title', 1)) {?>
div class="page-header">
<h1><?php echo this->table->label; ?></h1>
</div>
<?php }
echo $this->table->intro;
?>
I changed it to:
Code:
if ($this->params->get('show-title', 1)) {?>
<?php
$app = JFactory::getApplication();
$item = $app->getMenu('site')->getActive;
?>
div class="page-header">
<h1><?php echo this->table->label; ?></h1>
</div>
<?php }
echo $this->table->intro;
?>
and that added the menu item text as the heading.
However, I also noted that this doesn't respect the setting of the show-title parameter; no matter whether I have the Show Title option on or off - or whether I have the Show Page Heading on or off for the menu item itself - it always shows. So it seems like that show-title parameter isn't getting used correctly.
This sounds like something which might be worth adding to the Bootstrap template. Here's how I (possibly) see this working:
- If both the list parameter and the menu parameter are OFF, don't show anything.
- If the menu item's Show Page Heading is on and the list's Show Title element is off, show the Menu Title
- If the menu item's Show Page Heading is off and the list's Show Title element is on, show the List name
- If both are on, the menu title controls (in case you use the same list in two different menu items, with different filters or something).
Does that sound like something doable? I think that would be a great addition. In fact, the same behavior could apply to forms as well.