Forum
Perch page combine with layout
Hello,
This is my default page
<?php include('perch/runtime.php'); ?>
<?php perch_layout('global.header'); ?>
<?php perch_content('Content'); ?>
<?php
perch_layout('global.footer', array(
'newsletter_section'=>true,
));
?>
In perch page attributes i have following code
<perch:pages id="newsletter_show" label="Newsletter" type="checkbox" value="true" divider-before="Settings" help="Add newsletter section above footer" suppress="true" />
And in my global.footer have
if (perch_layout_var("newsletter_section",perch_page_attribute('newsletter_show', array('template' => 'newsletter.html','skip-template' => true,'return-html' => false), true))){
perch_content('Newsletter');
}
If checkbox is true, content is showing. but when its false in output have text "1" and content is not displayed.
SOLVED:
Ok, great.