Hi,
I am using Chronoforms_J1.6_V4_RC1.8 with Joomla 1.6.8 (just installed it).
I have created a new menu for my form. Everything seems to work fine except from the Page Heading: I have set 'Show Page Heading' to yes and I have entered something in the 'Page Heading' parameter. However the form displays without any heading.
Can someone help please?
Cheers!
I am using Chronoforms_J1.6_V4_RC1.8 with Joomla 1.6.8 (just installed it).
I have created a new menu for my form. Everything seems to work fine except from the Page Heading: I have set 'Show Page Heading' to yes and I have entered something in the 'Page Heading' parameter. However the form displays without any heading.
Can someone help please?
Cheers!
Hi tsili,
I don't think that ChronoForms has ever supported Page Headings in that way. I guess it shouldn't be too hard to add. Do you know what code is used to do this in an article page?
Bob
I don't think that ChronoForms has ever supported Page Headings in that way. I guess it shouldn't be too hard to add. Do you know what code is used to do this in an article page?
Bob
Hi GreyHead and thanx very much for the quick response.
The code used is something like that:
<?php if ($this->params->def('show_page_heading', 1)) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
This should be added somewhere around
echo $form->form_output;
in components\com_chronoforms\chronoforms.html.php
but I haven't figured out yet how...
The code used is something like that:
<?php if ($this->params->def('show_page_heading', 1)) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
This should be added somewhere around
echo $form->form_output;
in components\com_chronoforms\chronoforms.html.php
but I haven't figured out yet how...
Hi,
You may add your code above the
Regards,
Max
You may add your code above the
echo $form->form_output; line, please let us know if it works fine!🙂Regards,
Max
Hi,
I've tried but $this is giving me an error.
Should I change anything in the code?
I've tried but $this is giving me an error.
Should I change anything in the code?
OK guys I found it. My solution displays all page headings (I wanted to display all, so I didn;t bother checking if page_heading is set).
The solution is the following:
edit the file /components/com_chronoforms.html.php before the end:
Replace
with:
Hope this helps anyone in the same situation.
Cheers
The solution is the following:
edit the file /components/com_chronoforms.html.php before the end:
Replace
echo $form->form_output;with:
$menus = &JSite::getMenu(); //returns JMenuSite object
$menu= $menus->getActive(); //gets current page menu item properties
//retrieve page parameters
$params = new JParameter( $menu->params );
$page_heading = $params->get('page_heading');
echo "<div class=\"item-page\"><h1 class=\"componentheading\">" . $page_heading . "</h1>" . $form->form_output . "</div>";Hope this helps anyone in the same situation.
Cheers
Nice solution, thanks for posting!🙂
Regards,
Max
Regards,
Max
This topic is locked and no more replies can be posted.
