Question
· May 19, 2016

Overriding default HTML generated by Helper plugins

Hi -

Let's say I want to override the HTML that is generated by provided ZEN Mojo Helper Plugins I use the onloadHandler method of my document page, retrieving elements, and modifying them using jQuery syntax.

For example, I'm using bootstrap, and, I want  the <button> element automatically generated with the use of the $navbar layout object, to collapse/expand a different <DIV> on my page, to the default one it produces. 

Is this the correct spot and approach to use ? 

thanks

Steve

Discussion (2)1
Log in or sign up to continue

Steve, the correct approach is to either

a) subclass the plugin in question and generate a different HTML base or invoke additional beautify code

b) build your own plugin if you want to support a new layout object

What you describe sounds like a specialized $navbar component, so you may want to subclass the bootstrap plugin and register a specialized $navbar widget, e.g. $mynavbar.