WebsiteBaker Support (2.11.x) > General Help & Support
Template with slider in WB 2.10 and Template with slider in WB 2.11
(1/1)
henri:
Template with slider in WB 2.10.0-RC1 and PHP-Version: 7.2.2
works with the code below in template.
<?php
if ($contentblock[10] != '') {
echo '<div id="topslider">'.$contentblock[10].'</div>';
} else {
if ($isstartpage) {
echo '<div id="topslider">'; include('responsive-slider/responsive-slider.php'); echo '</div>';
} else {
echo '<div id="headerpic" style="background-image:url('.TEMPLATE_DIR.'/images/top.jpg)"><img src="'.TEMPLATE_DIR.'/images/top.jpg" alt="" /></div>';
}
}
?>
The same template with slider in 2.11.0 -r77 and PHP-Version: 7.2.2
works with the code below in template.
<?php
if ($contentblock[10] != '') {
echo '<div id="topslider">'.$contentblock[10].'</div>';
} else {
if ($isstartpage) {
echo '<div id="headerpic" style="background-image:url('.TEMPLATE_DIR.'/images/top.jpg)"><img src="'.TEMPLATE_DIR.'/images/top.jpg" alt="" /></div>';
} else {
echo '<div id="topslider">'; include('responsive-slider/responsive-slider.php'); echo '</div>';
}
}
?>
What is the cause of this.
dbs:
Hello, please use for code the code button (#) in the editor.
You wonder why two different codes work?
A link to the problem page is helpful.
henri:
--- Quote from: henri on March 11, 2018, 09:48:44 AM ---Template with slider in WB 2.10.0-RC1 and PHP-Version: 7.2.2
works with the code below in template.
--- Code: --- <?php
if ($contentblock[10] != '') {
echo '<div id="topslider">'.$contentblock[10].'</div>';
} else {
if ($isstartpage) {
echo '<div id="topslider">'; include('responsive-slider/responsive-slider.php'); echo '</div>';
} else {
echo '<div id="headerpic" style="background-image:url('.TEMPLATE_DIR.'/images/top.jpg)"><img src="'.TEMPLATE_DIR.'/images/top.jpg" alt="" /></div>';
}
}
?>
--- End code ---
The same template with slider in 2.11.0 -r77 and PHP-Version: 7.2.2
works with the code below in template.
--- Code: ---<?php
if ($contentblock[10] != '') {
echo '<div id="topslider">'.$contentblock[10].'</div>';
} else {
if ($isstartpage) {
echo '<div id="headerpic" style="background-image:url('.TEMPLATE_DIR.'/images/top.jpg)"><img src="'.TEMPLATE_DIR.'/images/top.jpg" alt="" /></div>';
} else {
echo '<div id="topslider">'; include('responsive-slider/responsive-slider.php'); echo '</div>';
}
}
?>
--- End code ---
What is the cause of this.
--- End quote ---
henri:
To avoid misunderstandings.
For WB 2.10 and WB 2.11 use the exact same template.
In WB 2.10 the Topslider appears when opening page.
In WB 2.11 the Headerpicture appears when opening page.
In WB 2.11 I want the slider to start when I open the page, then I have to swap the Topslider rule with the Headerpicture rule in the template.
After exchanging the rules, it works perfectly.
But in my opinion this should not be necessary with a template that has not changed anything.
Navigation
[0] Message Index
Go to full version