Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Passing variables to Editable Page?

edited March 2011 in Installation
What is the best way to pass variables to a CMS page? I have a custom module that I am currently using in blocks but now I need to add it to a CMS page. Below is the variable I need to pass to the page.

$staff = fuel_model('staff_members', array('find' => 'all', 'order' => 'precedence asc', 'where' => array('' => 'Leadership'), 'module' => 'staff'));


  • edited 6:01PM
    Can you continue to use the block in your page by adding {fuel_block('my_block')} in the body of your CMS page?
  • edited 6:01PM
    Bingo.... I don't know why I didn't think of that. I was trying to use fuel_model and "{loop}" to iterate over the array within the Page content. Using fuel_block is a much better idea.

  • edited 6:01PM
    Alternatively, you could paste in the php code that you have in your block above and when you save it, it should convert what you have to the proper template code (must be enclosed in php tags).
  • edited 6:01PM
    Good to know. Thanks.
Sign In or Register to comment.