Questions about transferring data to parse |
Now I'm using parse to generate pages, and I attach an array with it, like the following:
Code: private $data = array( As you can see, $data is an array and one of its element, css, is also an array. In the template I can use {title} to refer to 'title' element in $data, but how to use css array in view? Like {css:test} ? It doesn't work.
Change your array from this:
PHP Code: private $data = array( To this: PHP Code: private $data = array( In your template you can then loop an array by doing this Code: {css} // Start of the array, The parser will see it is an array More info on this in the user guide http://www.codeigniter.com/user_guide/li...able-pairs |
Welcome Guest, Not a member yet? Register Sign In |