It looks like you're new here. If you want to get involved, click one of these buttons!
class Contact extends CI_Controller {
function __construct()
{
parent::__construct();
}
function index()
{
$this->load->library('form_builder');
/* Form builder content */
$vars['form'] = $this->form_builder->render();
$this->fuel->pages->render('Contact', $vars);
}
}
$page_init = array('location' => 'contact', 'render_mode' => 'cms');
$this->load->module_library(FUEL_FOLDER, 'fuel_page', $page_init);
$this->fuel_page->add_variables($vars);
$this->fuel_page->render();
Comments
$this->fuel->pages->render('Contact', $vars, array('render_mode' => 'cms'));
I was trying to find that in the documentation, not sure if I overlooked it or not but I appreciate your help.
Thanks!
https://github.com/daylightstudio/FUEL-CMS-User-Guide-Module
We will be working on getting that documentation on a public server so you don't have to download it as we get closer to rolling 1.0 out.
I used to be able to check {$session->flashdata} in the CMS but it's throwing an error now.
This after setting the flashdata and redirecting back to the page:
$this->session->set_flashdata('success', TRUE); redirect('contact');
It gives the following error:
Severity: Notice Message: Undefined property: CI_Session::$flashdata Filename: dwoo/Dwoo.php
Any ideas?
Thanks
Yes, the session library is loaded with: $this->load->library('session');
is session_flashdata() used to set the session or retrieve the session?
With regards to it working before and not now, I'm not sure. I just tested it out locally and it seemed to work OK. Did you try clearing out the compiled files?
Also, can you check in the fuel/application/config/parser.php file that the session is included in the "parser_assign_refs" config paramater. Those should be assigned on line 246 in the MY_parser.php file.
http://www.getfuelcms.com/forums/discussion/949/table-markup-is-mangled-after-save/p1
As I noticed the code I paste:
{if ($session->flashdata('success')) }
gets changed to
{if $session->flashdata 'success' }</code without the parentheses. In the link you mention adding a line to My_fuel_modules.php but how would I add that to the Pages module which is built in?
and added the line:
'sanitize_input' => array('template','php'),
But I still seem to have that same issue.
$config['module_overwrites']['pages'] = array('sanitize_input' => array('template','php'));
So, another new odd thing, my filenames when added to the DB are being changed to omit the . Is that supposed to happen?
ie test.jpg becomes testjpg in the DB.
This seems strange. I did notice another thread that talks about using 'sanitize_images' => FALSE in the module config, but that didn't work either.
so file 1.jpg would go into the db as 1jpg but saved as 1jpg.jpg
This is all I have in the module to modify the form to save the files:
$fields['item'] = array('type' => 'file', 'upload_path' => $upload_path, 'overwrite' => TRUE);
https://github.com/daylightstudio/FUEL-CMS/commit/0d6d6d201ebf0b4107d5b1296522f0163397334e
Thanks for the report
function on_before_save($where) { $where['item'] = $_FILES['item']['name']; return ($where); }
otherwise it saved without the period.
But that'll do I suppose.
(thought I was losing my mind!)