WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Daflekk template in 2.10.

(1/2) > >>

joyhill:
Hello

I upgraded system from 2.8.3 sp7 to 2.10 and noticed that right bar and slider did not work.

Can I fix it somehow or is it that daflekk does not work on 2.10?

Please respond quick, it is my customer's site!

Gast:
no problems for me with daflekk in WB 2.10.x, but i dont use the original version, because, the "logic" to switch any functions like slider, teaser  etc is not realy user-friendly

pls add your index.php from this template here as attachement

joyhill:
The index.php is included.

Gast:
thanks for replay && index.php


a tip to check it, is Variable $page_id avaiable or not
add this code somewhere in the top of the index.php in a php-area


--- Code: ---echo '$page_id:        '.(boolval($page_id) ? 'true' : 'false')."\n";
--- End code ---

this give's a output like $page_id: true  or $page_id: false in the top of the template.
if the answer  == true, the template will not show any other extra functions like slider, teaser etc

to deactivate this line after the test, add a double slash // or # in the front of this line, so it is a simple comment without output

the result of this test is important for all switches in this template, i try to explain it

Originalcode (in your template) - the switch for the slider in line 113


--- Code: ---<?php if ( !isset($page_id) OR ( isset($template_id) AND $page_id==4) ) {
                 include('flexslider.php');
         } else {
                 echo '<div class="header"><a href="'.WB_URL.'"><img class="logopic" src="'.TEMPLATE_DIR.'/img/logo.png" alt="" /></a></div>';
         }
         ?>
--- End code ---

the switch is in the first line and in use on different places in your index.php


--- Code: ---if ( !isset($page_id) OR ( isset($template_id) AND $page_id==4) ) {
--- End code ---

in details
$page_id - Variable for the page-id, defined in frontend-functions.php, avaiable, when the system reads the contents from the pages, it's not defined (false) on the start-page

!isset($page_id) - means: if Variable $page_id is not defined - works as identification for the start-page

OR ( isset($template_id) AND $page_id==4) - the template autor use the variable $template_id on his show-case, but nobody of the users has defined this as Variable somewhere, so this part cannot work. the operator "AND" stopped here the switch in the second part of this code with the result: this part can never be TRUE without a definition of $template_id

result of this disfunction is a missing slider, it show's everywhere the header pic

Solutions:
simple solution is a definition of $template_id in the top of your template with


--- Code: ---$template_id = TRUE;
--- End code ---

add this code in your empty line 8



to the right sidebar
your code in line 153

--- Code: ---<?php if (!isset($page_id) OR $page_id==4) { 
--- End code ---

means in simple words: show the right sidebar only on the startpage and only on the page with ID == 4, not somewhere else - is this, what you want and on the right page?? so pls check the page_id of your startpage

i'm now on the dayly tour to my doc and coming back in the late afternoon, i hope, that this answer give's a help and solve the problem or somebody of the others can help

joyhill:
Thank you very much! That helped and everything works. Funny that I never changed those pageid == 4 things. I think they are standard. But I change them to pageid==1 it works with that line added on line 8.

Navigation

[0] Message Index

[#] Next page

Go to full version