This is driving me mad! I want to include a simple contact form on a sites homepage. I can't work out if I need to build a module, widget or plugin. None of them seem to be quite right! Modules only seem to work as standalone pages eg the existing contact module. Widgets only seem to display data (got from db or some kind of feed eg twitter) and a plugin seems to be just like a library class. What I need is most like a module. I need a controller (to display the correct view and process the data from the form and views dependent on whether the form has been submitted or not. My problem is I can't work out how to include a module as a section of a page (just like you would a widget) instead of a page in it's own right.
Pyrocms module or widget or plugin
2.3k Views Asked by musoNic80 At
1
There are 1 best solutions below
Related Questions in CODEIGNITER
- how to send email from localhost using codeigniter?
- CodeIgniter + XDebug: debug only working in the main controller, index() function
- Xampp redirects to /xampp
- how show result the autocomplete in the map in CodeIgniter Google Maps V3 API Library?
- Cannot use object of type stdClass as array
- Missing images after I redirect to a subdirectory using route.php and/or .htaccess in CodeIgniter Framework
- Invalid Api key using RestServer
- how to run CodeIgniter controller in cli while passing value with $_GET
- how to fetch all records from order table in Codeigniter
- How work with parked domain names in Codeigniter?
- calling mysql procedure using codeigniter [Error: result consisted more than one row]
- pass parameters in URL code igniter
- codeigniter-error on search and display data from database
- 500 error status : using angular js and codeigniter 2.2
- Select AVG in CodeIgniter
Related Questions in PYROCMS
- Getting id from stream in a loop for use in edit form pyrocms
- Using pyrocms and jquery.load()
- adding two fields in single relationship in pyrocms
- Codeigniter Temporary Solution for Mcrypt extension
- How to send email using pyrocms?
- Pyrocms stopped rendering after page refresh
- Display Categories in firesale
- PyroCMS errors on Production server with Call to a member function num_rows() on a non-objec
- I am facing some issue during pyrocms installation, Anyone can help me?
- Pyrocms module or widget or plugin
- Need help in adding a iframe within a page in pyrocms
- Hello World Module in PyroCMS
- ci-merchant purchase() not working
- PyroCMS and CodeIgniter Routing Issue
- Displaying news on category basis
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Any of those would work.
A module is a MVC triad that can interact with a URL, show views, have its own models, helpers, config, etc. A module is the full meat and two-veg.
A Widget is just a self-contained intelligent partial. That means it takes a few options from the Control Panel for each instance and spits out a chunk of HTML.
A Plugin is just a tag. This tag is used in the template, pages, news, whatever and spits out a chunk of HTML too. A Plugin can have various methods in the class, each method will be a different tag.
I have actually made contact forms as all of these types of addon, but the one I have settled on for PyroCMS v1.1 is a modular plugin. This means there are views, models, etc for the module but we can skip the controller and just make a plugin like so.
That plugin matches up to the tag:
That is because it is in the contact module and the method is form. See? :)