is there a better way to do this? Jquery and Macros
Hello all you smart folks out there!
i am workign on some fairly straight forward code.. i am using jquery and the awesome node2json package demoed at code garden this year to populate a cascading dropdown -- simple enough.
when using node2json, i am pulling back the nodeName and the nodeID -- of course, when you pick somethign from the second dropdown, it sets the href on teh GO button... right now i can only use the nodeID - so my url looks like http//domain.com/1234
how can i take advantage of niceUrl() to get the actual niceUrl???
i have tried the following --
1. render the href as {localLink:1234} syntax... but since it is dynamic, umbraco would never catch and parse anyway.
2. i was trying to have a maco in my jquery syntax, but cannot for the life of me figure out how to use a jquery variable as a macro param -- and it would be dynamic anyway... and again... umbraco could not catch and parse on the fly.
it's like i wish there was a javascript or jQuery extension for umbraco to expose things like niceUrl, etc. -- am i crazy?
is there a better way to do this? Jquery and Macros
Hello all you smart folks out there!
i am workign on some fairly straight forward code.. i am using jquery and the awesome node2json package demoed at code garden this year to populate a cascading dropdown -- simple enough.
when using node2json, i am pulling back the nodeName and the nodeID -- of course, when you pick somethign from the second dropdown, it sets the href on teh GO button... right now i can only use the nodeID - so my url looks like http//domain.com/1234
how can i take advantage of niceUrl() to get the actual niceUrl???
i have tried the following --
1. render the href as {localLink:1234} syntax... but since it is dynamic, umbraco would never catch and parse anyway.
2. i was trying to have a maco in my jquery syntax, but cannot for the life of me figure out how to use a jquery variable as a macro param -- and it would be dynamic anyway... and again... umbraco could not catch and parse on the fly.
it's like i wish there was a javascript or jQuery extension for umbraco to expose things like niceUrl, etc. -- am i crazy?
thanks for reading ;)
Hey smart Bob!
if I understand correctly, you want jQuery to do something like umbraco does using {locallink}.
You can't do that since jquery is frontend and it has no clue of what id's and so on is sitting in the backend.
But, since you're allready getting the ID from json, why not get the niceURL as well?
Correct me if I completely misunderstood you.
Cheers,
Peter
i suppose i could look into the razor scripting for node2json and hack it for this need ;)
is working on a reply...