Setting page variables

edited February 2014 in Share
I'm using Fuel 0.9.3 and am setting 2 variables in a page like this:

<?php fuel_set_var('pagebanner_class', 'riding'); fuel_set_var('page_name', 'Riding Tips'); ?>

So that in the layout I can either have a full length page banner behind the title or not (below loading the header and above main body content). This code looks like this:

<?php // $pagebanner_class automatically references the // fuel_set_var('pagebanner_class', 'classname') // used on page with a full length image banner if (isset($pagebanner_class)) { ?> <header> <div class="pagebanner <?=fuel_var('pagebanner_class') ?>"> <div class="row"> <div class="large-12 columns"> <h1><?=fuel_var('page_name') ?></h1> </div> </div> </div> </header> <?php } ?>

It all works fine until I go to "Fuelify" the page so that other staff can edit the content. I realized that when doing so those page variables are lost/transformed in a way that just makes them text in the page, or irrelevant notes. So I just wanted to know how I can get around this then or what the best way to handle this is.



Sign In or Register to comment.