Validation Q

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Dan Stylez
Registered User
Posts: 271
Joined: Tue Jan 16, 2018 6:17 am

Validation Q

Post by Dan Stylez » Sat Oct 12, 2019 6:03 pm

Would an extension pass validation if it added a div round something?

Example for the overall_header_page_body_before event:

HTML would just have:

Code: Select all

<div style="slide-socials-wrapper">
<!-- INCLUDE slidesocials.html -->

Then to close the wrapper, the overall_footer_page_body_after event:

HTML would just have:

Code: Select all

</div>
This would probably conflict with any other extension that uses one of those events.
Image
When you’re hot, you’re hot... when you’re cold, you’re not hot.

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3942
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Validation Q

Post by kasimi » Sat Oct 12, 2019 6:16 pm

Dan Stylez wrote:
Sat Oct 12, 2019 6:03 pm
This would probably conflict with any other extension that uses one of those events.
Why would it? Your wrapper div would include whatever that other extension adds. If that other extension also adds a wrapper, you would have two wrapping divs which is perfectly fine. As long as the resulting HTML is valid, I don't see why it shouldn't be allowed. :)

User avatar
Dan Stylez
Registered User
Posts: 271
Joined: Tue Jan 16, 2018 6:17 am

Re: Validation Q

Post by Dan Stylez » Sat Oct 12, 2019 6:45 pm

Thanks for the reply, I assumed any html another extension adds to that event would end being up outside the div wrapper my extension had added and cause a conflict
Image
When you’re hot, you’re hot... when you’re cold, you’re not hot.

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3942
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Validation Q

Post by kasimi » Sat Oct 12, 2019 6:56 pm

If the other extension's template event is handled first then yes, its content will be outside of your wrapper. That may be a problem for your extension in particular, i.e. your wrapper might not be the outer-most one, but it won't affect the resulting document's integrity. Unfortunately there's no way to force your extension's template events to be handled first. As far as I remember, template events are handled alphabetically by extension vendor/extname, but you shouldn't rely on that.

User avatar
Dan Stylez
Registered User
Posts: 271
Joined: Tue Jan 16, 2018 6:17 am

Re: Validation Q

Post by Dan Stylez » Sun Oct 13, 2019 6:24 am

Thanks for the heads up, you were right about the events being handled alphabetically,

Do you know if a style would be validated if it had some custom events added? all the original events are still there
Image
When you’re hot, you’re hot... when you’re cold, you’re not hot.

User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 8408
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius
Contact:

Re: Validation Q

Post by _Vinny_ » Sun Oct 13, 2019 7:57 pm

Dan Stylez wrote:
Sun Oct 13, 2019 6:24 am
Thanks for the heads up, you were right about the events being handled alphabetically,

Do you know if a style would be validated if it had some custom events added? all the original events are still there
You are free to add custom events as long as all original events are in your style.

User avatar
Dan Stylez
Registered User
Posts: 271
Joined: Tue Jan 16, 2018 6:17 am

Re: Validation Q

Post by Dan Stylez » Sun Oct 13, 2019 9:36 pm

Thanks Vinny :)
Image
When you’re hot, you’re hot... when you’re cold, you’re not hot.

Post Reply

Return to “Extension Writers Discussion”