ryan Posted July 8, 2012 Share Posted July 8, 2012 This probably won't be useful to most people, but this is a module I put together a couple weeks ago for my own needs. I thought it might be helpful with a question that came up in another thread, so just wanted to post it here too since I figured all the modules should be listed here. ProcessWire Modules Fieldtype Fieldtype that stores reference to one or more other modules. This is similar to FieldtypeModule except that it stores multiple modules. It uses asmSelect to make the selection sortable/searchable. To install Copy to /site/modules/ and go to Admin > Modules > Check for new modules. Usage notes Note the configuration settings that appear on the details tab when creating a new field that uses this module. Lets say you created a field called my_modules that uses this Fieldtype. The value of your $page->my_modules will be a PHP array. When $page->outputFormatting is TRUE, the values of the array will be selected module objects (already instantiated/initialized). When output formatting is FALSE, the values will be module IDs (integers). Those IDs can be converted to either the module class name or an instance of the module using existing $modules API methods. Download https://github.com/ryancramerdesign/FieldtypeModules 1 Link to comment Share on other sites More sharing options...
Pete Posted July 9, 2012 Share Posted July 9, 2012 Sounds interesting - are you able to share what you're using it for? Link to comment Share on other sites More sharing options...
ryan Posted July 9, 2012 Author Share Posted July 9, 2012 Actually I was using it for the Blog profile. I was using it so that you could select from what "widget" modules you wanted to display in the sidebar and sort them. The widgets were markup rendering modules. However, I went back to making the widgets as pages (selected as page references), as I thought it was ultimately more flexible. So in the end, I'm not using this module for anything. But think there will be other situations where it is useful. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now