taocean

I register shortcodes in a dedicated class like this

taocean

That's what I thought about it being possible to have anywhere. I just popped in the controller as seemed most appropriate at the time.

MichalKleiner

it’s a static method, can be anywhere, no need to have it on controller or model class

taocean

I want to move to elemental eventually, but this is tidying up last sections before pushing live after upgrading from SS3 to SS4. One step at a time.

MichalKleiner

my second thought was that it’s too long and could be split up a bit to reusable bits

MichalKleiner

I had the same thought, but let’s not push Elemental too much 😉

firesphere

That looks like quite a complex solution that could more easily be solved with Elemental...

taocean

The shortcode makes it possible to define any colour for any text or image, define a link for benefits to link to, define exactly which benefits display, how many columns they display at in desktop view. It makes it possible to use the same shortcode and param format in any section of the website, no matter than background or colour requirements.