If you have created a page in the admin, the parsing should automatically be applied to all layout variables. If you've created a module and want to enable parsing on certain fields, there is a $parsed_fields property in the base_module_model class (which modules extend). This should be an array of the fields you want to have parsed on output. If you are using a "magic" attribute like $myobj->content_formatted, you will need to include "content_formatted" as well as "content" in the array. Does that make sense?
I'm a n00b to FuelCMS, and also to working in an MVC, but i'm having a similar issue I think. I am using the fuel_model object to pull in all blog_posts on a view file. In the Blog CMS, I add a new post, with an image.
The tag looks like:
<img src="{img_path('my_image.jpg')}" alt="" / >
and when published, the img_path shortcode does not parse at all.
Try <?=parse_template_syntax($post->content)?>" or "{$post->content_formatted}"?
With regards to the second question, there currently isn't any field in the database that stores an image name (just a field to upload images). Therefore there is no method to retrieve an image associated with a post. However, you can add an "image" field to the fuel_blog_posts table to store that image and then you can use: {img_path($post->image)}
Comments
The tag looks like:
<img src="{img_path('my_image.jpg')}" alt="" / >
and when published, the img_path shortcode does not parse at all.
What am I doing wrong here?
Something like.. <?php echo $post->images; ?>
With regards to the second question, there currently isn't any field in the database that stores an image name (just a field to upload images). Therefore there is no method to retrieve an image associated with a post. However, you can add an "image" field to the fuel_blog_posts table to store that image and then you can use:
{img_path($post->image)}