I'll give you a concrete example - but much simplified to save on space here!
We create a page "foo" in the admin with some body content. And we have a controller (foo.php):
<?php class Foo extends CI_Controller { function __construct() { …
I found there is another quirk to what I'm trying to achieve! I should have worked this out earlier!
If the view file is the same name as the controller and in the root of application/views, then fuel_var('body') delivers the content as you propose…
That's a lot neater! I've tried it on a fresh install, and it seems to cover exactly what I was after. Thanks - I'm loathe to edit the system side stuff, so I didn't venture into that model. But in trying to get around it, I've learned a lot more ab…
I've reached a solution - of sorts.
I've written a helper to fetch the fuel_page_variables 'body' content where the fuel_pages 'location' value matches the current url, respecting the 'published' value. So I can use this in controllers that would …
Following on from the last post, for the a) option, I was thinking of something like this in the controller:
$CI =& get_instance(); $CI->load->module_library(FUEL_FOLDER, 'fuel_page', array('location' => 'contact', 'render_mode' =>…
OK, I've been playing around with a default install of Fuel, & I think the reason I became confused about the earlier project was because the CMS content was displayed regardless of the publication status when using the fuel_var('body','') varia…
Thank you for your detailed reply, the 'render_mode' argument is certainly new to me! I will give that a try soon.
With regard to the un-published content appearing in a view on the same path, it occurred to me that there is some value in it not sh…
I set up the Widget demo site to test a few things, and found that if there is an unpublished page with CMS content, and you create a view with a matching URL, and that view has a fuel_var('body') variable, then the view can include the "unpublished…
OK, I solved my immediate problem - the "quotes" example uses
$quote->name
to extract its data. I couldn't get this to work (like for like) in my example, however using the index name of the returned array did eg
$hz_ad['url']
The earlier ques…
Good news! I answered my own question, By using the 4th argument of assets_path() declaring the url absolute, img() must acknowledge this and doesn't interfere, so the working usage becomes:
img(assets_path($row['photo_file'], 'photos', NULL, TRUE)…
Thanks again - very valuable advice. I think more by accident than design, I had checked all the points you recommend, but I have it confirmed now. However, having followed your instructions to the letter, I still could not upload .M4V (.MP4 no prob…
Thanks for the quick response! Yes, I can see the database solution would work much better. I went down the dbprefix route because I thought it might be more "economical" when (and where) hosted. I'm still curious why the prefix angle nearly works, …
I should qualify the above, the admin system doesn't seem to consistetly use prefixes! For example, an error like:
Error Number: 1054
Unknown column 'fuel_users.first_name' in 'field list'
SELECT sm_fuel_blog_posts.id, title, CONCAT(fuel_users.fi…
I think I assigned 0 instead - but declaring a default, that solved it. Thanks! If I had rushed ahead and inserted some category data, I wouldn't have noticed.