WebsiteBaker Support (2.8.x) > Templates, Menus & Design
How to get bs_verflox template to run correctly?
(1/1)
zirzy:
Hi all!
I'm testin bs_verflox template on my test site. Template doesn't include snippets: slider, 2col-intro and parallax, why is that?
I got CMS Version 2.8.3+SP6
jacobi22:
there is a switch for it in index.php of this template
Line 14: $isstartpage
its set to FALSE as standard and to TRUE, if the condition in line 27 is correct, so that the snippets only works on the start page
index.php of this template // Line 27 - must have the page_id from your startpage
Originalcode
--- Code: ---if(!isset($page_id) OR $page_id==4) {
--- End code ---
if you need it also on other pages, use a code like this with your wished page_id's
--- Code: ---if(!isset($page_id) OR $page_id==4 OR $page_id==28 OR $page_id==56) {
--- End code ---
in my example, my startpage has the ID = 159
--- Code: ---if(!isset($page_id) OR $page_id==159) {
--- End code ---
front.php // line 75
here the page_id's from your wished slider-pages like my example
--- Code: ---$slider_page_ids = '586,580,541';
--- End code ---
front.php // line 79
--- Code: --- include('snippets/2col-intro.php');
--- End code ---
this line produceed a white screen in my test installation, if i use it together with the responsive slider, dont know, why and didnt understand
if you have the same problem, deactivate this line with a // or # in the front of this line or include another snippet, to see the effects
zirzy:
--- Quote from: jacobi22 on June 06, 2016, 02:20:49 PM ---there is a switch for it in index.php of this template
Line 14: $isstartpage
its set to FALSE as standard and to TRUE, if the condition in line 27 is correct, so that the snippets only works on the start page
index.php of this template // Line 27 - must have the page_id from your startpage
Originalcode
--- Code: ---if(!isset($page_id) OR $page_id==4) {
--- End code ---
if you need it also on other pages, use a code like this with your wished page_id's
--- Code: ---if(!isset($page_id) OR $page_id==4 OR $page_id==28 OR $page_id==56) {
--- End code ---
in my example, my startpage has the ID = 159
--- Code: ---if(!isset($page_id) OR $page_id==159) {
--- End code ---
front.php // line 75
here the page_id's from your wished slider-pages like my example
--- Code: ---$slider_page_ids = '586,580,541';
--- End code ---
front.php // line 79
--- Code: --- include('snippets/2col-intro.php');
--- End code ---
this line produceed a white screen in my test installation, if i use it together with the responsive slider, dont know, why and didnt understand
if you have the same problem, deactivate this line with a // or # in the front of this line or include another snippet, to see the effects
--- End quote ---
Thanks again jacobi22 for your kind help, you are my saviour!
Slider and parallax seems to work fine now. One more thing: I added two extra blocks in info.php file (content 4 and content 5) if I insert <?php $page_content_4; ?> and <?php $page_content_5; ?> to the 2col-content snippet, it comes out with nothing.. Why? And what if I wanna modify the text of 2col-intro snippet? Yes I can do it from addon file editor, but if I want it to be editable from page wysiwyq, how can I fix it?
jacobi22:
--- Quote ---One more thing: I added two extra blocks in info.php file (content 4 and content 5)
--- End quote ---
some basics....
everytime, when you change something in the info.php of a module or template, you have to reload the addons (Addons -> Advanced -> activate Checkboxes -> Reload)
after the reload, you see the new sections in your section administration like this pic
here Block 4 + Block 5
--- Quote ---if I insert <?php $page_content_4; ?> and <?php $page_content_5; ?> to the 2col-content snippet, it comes out with nothing.. Why?
--- End quote ---
two methodes to show the content from the new section
1. simple call with
--- Code: ---<?php echo page_content(4); ?>
--- End code ---
2. use a buffer (i add this code in the top of my front.php)
--- Code: ---<?php
ob_start();
page_content(4);
$page_content_4 = ''.ob_get_contents();
ob_end_clean();
ob_start();
page_content(5);
$page_content_5 = ''.ob_get_contents();
ob_end_clean();
?>
--- End code ---
now you can use the Variable $page_content_5 somewhere in the snippets, otherwhise its empty like
--- Code: ---<div class="col-md-9"><div class="main-content">Content 4<br><?php echo $page_content_4; ?></div></div>
<div class="col-md-9"><div class="main-content">Content 5<br><?php echo $page_content_5; ?></div></div>
--- End code ---
i use here a "little helper", the hardcoded Content 5<br> to show me the block, empty or not
P.S.: you see this block only on page's with a defined section for page_content(4) or page_content(5)
Navigation
[0] Message Index
Go to full version