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('staff_categories.name' => 'Leadership'), 'module' => 'staff'));

Comments

  • edited 6:37AM
    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:37AM
    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.

    Thanks.
  • edited 6:37AM
    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:37AM
    Good to know. Thanks.
Sign In or Register to comment.