Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

Adding HTML, JavaScript when ignored

mitchoyoshitaka
Pepper Developer
Posted on Dec 17, '07 at 09:03 am

I’m looking to write a Pepper that specifically adds code when Mint is ignoring the user, according to the MintIgnore cookie. onJavascript is only triggered if the entire Mint js is written out. Is there another option for adding code (either HTML or JS) to a page, even when MintIgnore is on?

Shaun Inman
Mint/Pepper Developer
Posted on Dec 17, '07 at 10:16 am

This is completely unsupported by the API but you could try adding conditional output to the onPepperLoad() method, eg.. if the user wants to be ignored and the request is for ?js. Because this is unsupported I’m not sure how this would interfere with Mint’s operation (it could fatal error, it could generate a “headers already sent” error and break cookie setting). You might be able to figure something out with some trial and error though.

You must be logged in to reply. Login above or create an account