CW Whatever Component
Step 1: Create a template override
The first thing you want to do is create a template override for the whatever component's whatever view. Here's how you do that:
- In
/templates/{YOUR_TEMPLATE}/html
, create a folder calledcom_cw_whatever
. - In the
com_cw_whatever
folder you just created, create a folder calledwhatever
. This folder will contain your template override files. - In the
whatever
folder you just created, create a PHP file and name it whatever you want to name it. - Add your own custom script to the PHP file you created. Note that the "Whatever" parameter in the menu item is aviailable to use as
$this->whatever
in your PHP script.
Step 2: Create a CW Whatever menu item
- In the Joomla administrator, create a new menu item to render your new CW Whatever script. Set the menu item type to CW Whatever > Whatever
- In the menu item's Whatever tab, select your template override in the Script parameter.
- [Optional] In the menu item's CW Whatever tab, you can set the Whatever parameter to whatever you want it to be.
CW Whatever Module
Step 1: Create a template override
The first thing you want to do is create a template override for the whatever module. Here's how you do that:
- In
/templates/{YOUR_TEMPLATE}/html
, create a folder calledmod_cw_whatever
. - In the
mod_cw_whatever
folder you just created, create a PHP file and name it whatever you want to name it. - Add your own custom script to the PHP file you created. Note that the "Whatever" parameter in the module is aviailable to use as
$whatever
in your PHP script
Step 2: Add a CW Whatever module to any page(s) on your site
- In the Joomla administrator, go to Extensions > Modules and click "New" to add a new module.
- Select the CW Whatever module type.
- Select the layout you wish to use for the module. This will have the same name as the template override you created in step 1.
- [Optional] You can set the Whatever parameter to whatever you want it to be.
That's all there is to it. This component and module were designed to do as little as possible and be as simple as possible to enable you to add your own custom PHP scripts.