HTMLHelper Plugin - Submitting Enhancements

Hi groups,

I’ve just been introduced to the HTMLHelper plugin and although I think it’s pretty cool and helps tidy up my views a lot I’m finding that it’s lacking in a few places.

At the moment I’m writing a custom plugin that extends the Core ones and add / overwriting to put in the things that I need. I’m just wondering that what’s the process for submitting these enhancements to be part of the Core plugin instead?

Just a few examples of things I’m finding right now as I’m trying to migrate things across:-

  • the Link() method is missing a charset attribute as an argument
  • There is no support for adding in conditions for JS / CSS to be displayed on the page. i.e.

etc.

  • It would be helpful to have an HTMLHead method and supporting arguments on things like addJSContent() - We’ve got a few handlers that load JS scripts into the requests head if certain conditions are meet. It would be nice if we could do something like this…

HTMLHelper.addJSContent(content = renderView(‘JS/myScript’), sendToHeader = true )

So we can dynamically populate the Javascript from a view and push that into the header.

  • Off the back of that it would be good to see support for things like jQuery. Our JS Views don’t start have $(document).ready() at the start. The idea being then we can add join multiple JS Views together and then wrapper them when pushing them out. So again something like this would be ace:-

HTMLHelper.addJSContent(content = renderView(‘JS/myScript’),sendToHeader = true, framework = ‘jQuery’ );

Maybe content could be an array of JS content which is looped over and displayed within:

$(document).ready({function(){

});

At the moment I’m writing a custom plugin that extends the Core ones and add / overwriting to put in the things that I need. I’m just wondering that what’s the process for submitting these enhancements to be part of the Core plugin instead?

Does anyone know or have any opinions? :slight_smile:

Thanks,
James

Fork on github then send a pull request

Thanks John,

I don’t use / know Git ( SVN man ). Is there any other ways?

Zip it up and send it to Luis.

But, one of the cool things about open source projects is expanding your skill set. And, GitHub has great documentation to help people get started.

Either way, I’m sure Luis will welcome the code.

Git pull requests are the best. that is our preferred approach.

But anyways:
Here are your additions: https://github.com/ColdBox/coldbox-platform/commit/77c67d4d0bd7a4461c9f417b8edb5d63f353e510

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com