HTMLHelper Plugin

Hi folks,

I’m using the HTMLHelper plugin for the first time. In particular I’m trying to add a meta tag like so:

html.meta([{‘name’ = ‘robots’, ‘content’ = ‘noindex’}]);

Question 1: In order to use the HTMLHelper plugin, do I need to inject it into my handler? I’m assuming yes because before I had injected I got an error saying html is undefined.

Question 2: I injected the plugin and the error went away, however the meta tag did not show up when I viewed the source. Am I missing something?



The meta tag returns the HTML. So if you want todo that in the handler use the send to header argument.

Thanks Luis. I will give that a shot.

Nolan Dubeau

Load .,8,1

I FINALLY got around to implement this…looking at the date or my original post it was almost a year ago! haha

Anyways, it turns out that all the meta method does in HTML Helper is return back the generated meta tag, whereas addAssets is the function that has the sendToHeader argument. This seems silly that meta() doesn’t have this argument since meta only exists in the HTML head.

To get around this I created a custom plugin that extends the core HTMLHelper.

Feel free to add this to the core if you want.


Can you submit a pull request?

Luis Majano
Ortus Solutions, Corp
Toll Free/Fax: 1-888-557-8057
Direct: 909-248-3408
Twitter: @lmajano, @ortussolutions