How to get bs_verflox template to run correctly?

Gast

QuoteOne more thing: I added two extra blocks in info.php file (content 4 and content 5)

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



Quoteif I insert <?php $page_content_4; ?> and <?php $page_content_5; ?> to the 2col-content snippet, it comes out with nothing.. Why?

two methodes to show the content from the new section
1.  simple call with
<?php echo page_content(4); ?>

2. use a buffer (i add this code in the top of my front.php)
<?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();
?>


now you can use the Variable $page_content_5 somewhere in the snippets, otherwhise its empty like
<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>


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)




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
if(!isset($page_id) OR $page_id==4) {

if you need it also on other pages, use a code like this with your wished page_id's
if(!isset($page_id) OR $page_id==4 OR $page_id==28 OR $page_id==56) {

in my example, my startpage has the ID = 159
if(!isset($page_id) OR $page_id==159) {

front.php // line 75
here the page_id's from your wished slider-pages like my example
$slider_page_ids = '586,580,541';


front.php // line 79
include('snippets/2col-intro.php');
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


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?






Gast

#2
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
if(!isset($page_id) OR $page_id==4) {

if you need it also on other pages, use a code like this with your wished page_id's
if(!isset($page_id) OR $page_id==4 OR $page_id==28 OR $page_id==56) {

in my example, my startpage has the ID = 159
if(!isset($page_id) OR $page_id==159) {

front.php // line 75
here the page_id's from your wished slider-pages like my example
$slider_page_ids = '586,580,541';


front.php // line 79
include('snippets/2col-intro.php');
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

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