WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • General Help & Support (Moderator: Boudi) »
  • Template with slider in WB 2.10 and Template with slider in WB 2.11
  • Print
Pages: [1]   Go Down

Author Topic: Template with slider in WB 2.10 and Template with slider in WB 2.11  (Read 13442 times)

Offline henri

  • Posts: 148
Template with slider in WB 2.10 and Template with slider in WB 2.11
« 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.

 <?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.
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Template with slider in WB 2.10 and Template with slider in WB 2.11
« Reply #1 on: March 11, 2018, 11:27:05 AM »
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.
Logged
https://onkel-franky.de

Offline henri

  • Posts: 148
Re: Template with slider in WB 2.10 and Template with slider in WB 2.11
« Reply #2 on: March 11, 2018, 12:41:45 PM »
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: [Select]
<?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.

Code: [Select]
<?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.
Logged

Offline henri

  • Posts: 148
Re: Template with slider in WB 2.10 and Template with slider in WB 2.11
« Reply #3 on: March 11, 2018, 01:18:25 PM »
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.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • General Help & Support (Moderator: Boudi) »
  • Template with slider in WB 2.10 and Template with slider in WB 2.11
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2