by
KK » Mon Apr 13, 2015 9:02 pm
There can be several ways of implementing that functionality.
One could be that you use JQuery to make the links in the existing design invoke a JS function where you then make the AJAX call to the server (i.e. Couch) and get the results back to display.
What I mentioned above is staple AJAX stuff and you are free to use whatever technique suits you. I'll only elaborate on the server side code that you'll call using AJAX.
On the server-side, we can
call your existing blog template to return back the results.
Of course, the HTML returned via AJAX should contain only selected portion of the entire page (e.g. should skip the header, footer, sidebar etc.).
To do that, please see the following post -
viewtopic.php?p=18342#p18342It'll will give you a tag named cms:is_ajax.
You can use it in your existing blog template (both in list-view as well as page-view) to figure out whether the template is being invoked via AJAX and then return only the relevant markup
- Code: Select all
<cms:if "<cms:is_ajax />">
..
</cms:if>
Do you think this would help?
Please let me know.