How to create a simple 'Module/Plugin'
Created 7 years ago by davestar057

Hi,

Hope somebody can help me figure out how to achieve, what should be a really easy task.

I have a module from the old Pyro CMS - has a simple Conrtoller & Model file - then a 'Plugin' file which contains the function I can call on the front end to display a module/widget code.

There is little/zero documentation on creating Modules or Plugins on the site as far as I can see and I am just struggling to understand how I can have some basic logic in a controller and/or model - then once Its done what it needs to do (doesnt even need to interact with any admin or settings at moment) - then just display, or provide an array for the Twig parser to use on the frontend, in ALL footer views.

I am experienced in the previous version of Pyro - but I am stuggling with so little help on the docs for stuff like this.

Really hope somebody can help me figure out how to do something so basic - but which is seemingly proving to be v.hard/confusing using Pyro.

Thank You

thinkgraphical  —  7 years ago

Ryan has done a whole video serie about module development. Maybe start with watching those? https://www.pyrocms.com/videos/series/module-development

davestar057  —  7 years ago

Cheers will check this series out when I get chance...any quick pointers for achieving this simple task ?

ryanthompson  —  7 years ago

@davestar057 videos for plugins and other addon types coming very soon! Been on holiday 😊

davestar057  —  7 years ago

Ive viewed the videos - and these deal with creating whole views for steams etc.

...what I am after - which seems ridiculously hard - is to the just add a bit a of PHP logic, then use a view partial, that is then included in ALL views, in the footer for example.

There is no documentation on this as far as I can see.....can anybody be so kind as to give me some help here?!?!?

radja  —  3 years ago

@davestar057 yes indeed, the documentation is really not practical, I suggest looking Laravel tutorials instead