Problems with Fuel text editor & modules
No problems with the blog formatting whatsoever, as long as I set the posts formats to 'Markdown'.
However I have created a couple of modules, and when I create an item in the CMS and try to use the mailto or image icons I just get
{safe_mailto("livvy@mac.com")}
showing up on the page, and images are broken. can't work out how to fix this!
Comments
public $parsed_fields = array('content', 'content_formatted');
COntroller:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Testimonials_model extends Base_module_model { public $required = array('name','content'); public $parsed_fields = array('content', 'content_formatted'); function __construct() { parent::__construct('testimonials'); }
View:
<? $CI->load->model('testimonials_model'); $testimonials = fuel_model('testimonials', array('find' => 'all', 'precedence desc')); ?> <div id="testimonials"> <?= fuel_edit('create', 'Add Testimonial', 'testimonials'); ?> <? if(!is_null($testimonials)) { // Sort by date, so newest show first foreach ($testimonials as $key => $row) { $date[$key] = $row['date']; } array_multisort($date, SORT_DESC, $testimonials); foreach($testimonials as $t) { ?> <hr/> <?= fuel_edit($t['id'], 'Edit Testimonial', 'testimonials'); ?> <h2>Name: <?= $t['name'] ?></h2> <h2><?= ($t['date'] != '0000-00-00') ? 'Date: ' . $t['date'] : '' ?></h2> <p><?= $t['content'] ?></p> <? } ?> <? } ?> </div>
Each testimonial consists of name, content and date. 'content' is the field I am having issues with..
Thanks