You are right in that it is not dependent on the precedence but on the ID value. The items are saved in the order in which they appear and so their IDs naturally determine their order. Using the ID instead of the precedence allows it to work on mode…
For a simple module, each language version has it's own record.
The pages module does something similar but with the fuel_pagevariables table (each language has it's own set of page variables associated with it). When you go to create a page with…
For simple modules, it just becomes a where condition on your model call since it's just a table. The Pages module has a different table structure and so it operates a bit differently.
Did you try adding your own $this->order_by() in the list_items model? If you put in $this->debug_query() right before it returns the data items in the method, it will output the SQL being generated if you need to examine it.
For modules, you can add a varchar field called "language" to your module and query your front end results based on the language being viewed. There will then also be a dropdown select in the admin for you to filter the languages.
If you are using the Pages module to save these values you can hook into the saving process using a Layout object (instead of an array). There is a post_process_saved_values($values) that you can implement which passes in an array of data to be save…
If you change the title field to be the 2nd column in your table instead of the foreign key field does it work? Also, if you print out the value of $val, is it equal to 'title' before calling the parent::options_list(...)?
Try this or just changing $val to be title;
public function options_list($key = 'id', $val = 'title', $where = array(), $order = TRUE, $group = TRUE) { if ($val == 'category_id') { $val = 'title'; } $data = parent::options_l…
FUEL should be using the newer encryption library already. Where are you seeing issues with it using encrypt? Also, note that there is a branch on GitHub for 7.2 that we are working on addressing specific issues with 7.2.
You can do something like the following in your module's config in MY_fuel_modules.php:
... 'table_actions' => array('VIEW', 'EDIT', 'PDF' => array('func' => function($fields){ $CI =& get_instance(); if ($CI->fuel-…
The change I recommended hasn't been pushed to the branch yet and was something I thought you could test out locally since I'm not able to replicate just yet. The code change was specified here to the Dwoo/Compiler.php file:
https://forum.getfuelcm…
The documentation may be a little old there. CI 3 complicated how FUEL got around that with hooks that so now when a controller is setup, it will take over regardless. So any view files would need to be rendered from the controller as well.
You'll definitely want it set to "auto" instead of "views" if you are wanting to pull data from the CMS. If you create another page in the CMS does it pull in more data than home?
I'm having a tough time replicating that issue. If you change that line in the error in the Dwoo/Compiler 3044 to the following does it work:
foreach ($map as $k => $v) {
The post_process hook just needs to be callable. This means it could be a string value for a function, an array with the the object and method (e.g. array($my_object, 'my_post_process')) or a Closure function.
Are you wanting to save those dates onto another model entirely? Perhaps something like a foreach loop on the on_after_save hook that loops through the dates to save those to another model?