Dynamic Areas

Permalink
Ok here are the facts:
- custom single_page within package that lists about 150 file names so user can display only what they want to see.
- Using ajax with post to call controller, where I: 1) read the requested json file and echo the response (back to the ajax call) 2) exit to throw it back to the view to parse requested data.
- I don't want the page to reload, because then the user can 'pile up' a bunch of 'requested files' for viewing all at once.
- using jQuery clone to duplicate the template for the requested data dynamically

The problem:
- now I need to add comments to each of the 'requested files data' cloned template with a unique area name.

I've tried:
- setting a variable within the controller within the method called for the ajax request = doesn't set (probably because the view is not being reloaded, just appended)

Thinking:
- create all the possible areas within the view template and using a Javascript switch to display only the area pertaining to that requested file, BUT there are about 150 files so that ends up being A LOT of needless areas being loaded initially.

Does this make sense?
Any ideas?
Put those thinking caps on! :)

a2mDeveloper
 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.