0

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.

Paul
  • 1,122
  • 1
  • 10
  • 18
  • are you creating a module or a plugin? if you are creating a new moudule you have to create it inside module folder. – Sujeet May 19 '11 at 04:15
  • i beleive you should upload it to addons/plugins/ – Ivan May 19 '11 at 07:07
  • I'm creating a module which has a plugin for the front end. From the documentation, it says you can either do it in a module or as its own standalone plugin. I can get it to work in the plugins folder but I'd rather have it as a module... – Paul May 19 '11 at 08:14
  • according to your above requirement it would be better if you create a different module. – Sujeet May 20 '11 at 03:53
  • In what way? Different name? I have got around the issue by using a plugin in the plugin folder and using the module to do the processing side of it. – Paul May 20 '11 at 13:51

3 Answers3

1

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

Community
  • 1
  • 1
Igor Parra
  • 10,214
  • 10
  • 69
  • 101
0

With this:

{{properties:rental}}
{{/properties:rental}}

you will see the search_full div output.

Synxis
  • 9,236
  • 2
  • 42
  • 64
Faruk Omar
  • 1,173
  • 2
  • 14
  • 22
0

Use this

{{properties:rental}}

you don't need to close it

{{/properties:rental}}

Pyrocms developing-plugins