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

Custom Titles are great, how about Custom URL's?

USF
Minted
Posted on Mar 11, '08 at 11:50 am

Hi all, I’ve taken a peak in script.js and was wondering if anyone has fiddled this around to get a custom URL working just as custom titles do?

The reason I ask is because in Joomla! our item ID’s can be different for the same page depending on which direction you enter the page, and we’d like to use a URL we’d build out of certain things in php code… can I just add a

if (typeof resource == ‘undefined’) (stick in the normal stuff) ?? and then set it the same way I do the Mint_SI_DocumentTitle?

Thanks!

Chris

USF
Minted
Posted on Mar 11, '08 at 12:06 pm

And that doesn’t work, so there must be more to it.. here’s what I have got that doesn’t work:

if(typeof resource == ‘undefined’) { var resource=window.decodeURI)?window.decodeURI(document.URL):document.URL; }

then in my page calling mint I have this:

var Mint_SI_DocumentTitle = ”; var resource = ”;

USF
Minted
Posted on Mar 11, '08 at 12:10 pm

Also, setting var resouce = ‘text’; in the script.js works fine, so I’m just curious as to if my if statement is wrong???

USF
Minted
Posted on Mar 11, '08 at 12:14 pm

Alright, another update from me… lol

if you just comment out the default way Mint looks at it it works fine, I apparently just can’t get my javascript skillz up to par to check to see if that variable is defined… any ideas?

I think I’ll generate my custom URL and pass that if it works and if not pass ‘undefined’ like Shaun does for the custom Titles…

I’ll update when it is done.

USF
Minted
Posted on Mar 11, '08 at 12:45 pm

Well, I just ensured that I was always passing something as

var resource= ” ; in my page and commented out the line in script.js where resource is set… works fine!!

Hope this helps someone else!

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