Custom extension for one style only?

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Gumboots
Registered User
Posts: 400
Joined: Fri Oct 11, 2019 1:59 am

Custom extension for one style only?

Post by Gumboots »

I'm wondering if it's possible to write an extension that targets only one particular style, regardless of how many are installed. Which may seem like a daft thing to wonder, but I can see it having some applications.

Has anyone done it? If they have, what's the basic procedure?
User avatar
david63
Registered User
Posts: 18612
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Custom extension for one style only?

Post by david63 »

To some extent it will depend on what you are wanting the extension to do. An extension can target a specific style in the styles folder of the extension so if all the output was to go to the template then it may be possible.

The one problem though is that extensions are supposed to work with prosilver
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
User avatar
Gumboots
Registered User
Posts: 400
Joined: Fri Oct 11, 2019 1:59 am

Re: Custom extension for one style only?

Post by Gumboots »

Yes I know they are, so it's more or less hijacking a system to do precisely what it was not designed to do.

Actually I was thinking of having all the output in the template and CSS anyway. Only catch is it would require inserting a class into an existing tag in the markup, which would require javascript (no standard event is suitable for the purpose). That shouldn't be a huge issue though.
Post Reply

Return to “Extension Writers Discussion”