I'm new to Umbraco and only started to figure out the ins and outs of it. I've been developing websites for almost 15 years now and have quite a bit of experience but most of it on a PHP platform. I'm trying to broaden my horizons here so please bare with me :)
Anyway, I've figured out on my own the way document types, macros, templates, xslt files work and am now trying to do some other stuff. Namely I need to load a document content using an AJAX call. It's basically a panel with a menu (dynamic, which I figured out how to load) that loads content depending on the menu item selected (the documents loaded with the menu). What I need to figure out is how to get that content using an AJAX call since I don't want to reload the page.
Is this done using Umbraco BASE extensions or am I off in my thinking here? If so, how exactly? Do I just write a class and then stitch together an HTML string in a method?
Load content with an AJAX call
Hi,
I'm new to Umbraco and only started to figure out the ins and outs of it. I've been developing websites for almost 15 years now and have quite a bit of experience but most of it on a PHP platform. I'm trying to broaden my horizons here so please bare with me :)
Anyway, I've figured out on my own the way document types, macros, templates, xslt files work and am now trying to do some other stuff. Namely I need to load a document content using an AJAX call. It's basically a panel with a menu (dynamic, which I figured out how to load) that loads content depending on the menu item selected (the documents loaded with the menu). What I need to figure out is how to get that content using an AJAX call since I don't want to reload the page.
Is this done using Umbraco BASE extensions or am I off in my thinking here? If so, how exactly? Do I just write a class and then stitch together an HTML string in a method?
Thanks for the help
Personally, yes I'd use BASE to achieve this. See the documentation at http://our.umbraco.org/wiki/reference/umbraco-base/programming-a-class-for-the-base-system for more details. Bit hard to advise on the specific of your class not knowing the details, but yes guess you'll end up returning a string.
This topic can probably help you: http://our.umbraco.org/forum/templating/templates-and-document-types/16442-Use-jQuery-to-load-a-page-with-another-template
Jeroen
is working on a reply...