I have created a module that works on the administrator and public side. On the public side, I want to have a plugin for certain parts which I can put into the pages.
I have done this but it doesn't load after putting in {pyro:properties:rental}
Here is the code in /addons/modules/properties/plugin.php.
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Plugin_Properties extends Plugin
{
function rental()
{
$rentalForm = '<div class="search_full">
<div class="container_12">
<div class="grid_12">
<h1>Rental Search</h1>
</div>
<form action="" method="post">
<div class="grid_4">
<h2 class="liberationtext">Choose your destination</h2>
<label for="region">Region</label>
</div>
</form>
</div>
</div>';
return $rentalForm;
}
}
The module is called properties and the plugin just returns some HTML to display.
When I look at the log, it says ERROR - 2011-05-18 13:53:57 --> Unable to load: properties
I made this into a plugin (in the plugins folder) and it worked fine when I called it. I'm not sure开发者_运维百科 what to do. Any help would be good.
I still a beginner in pyrocms but all seems correct implementing this modular plugin.
- pyro tag {pyro:properties:rental} it's OK
- file container /addons/modules/properties/plugin.php. it's OK
- Code in plugin file it's OK
So the problem must be triggered in another part.
A very useful answer that mention modular plugins in Pyrocms module or widget or plugin
With this:
{{properties:rental}}
{{/properties:rental}}
you will see the search_full
div output.
Use this
{{properties:rental}}
you don't need to close it
{{/properties:rental}}
Pyrocms developing-plugins
精彩评论