I have a page that generates tiles for 15 of the most recent article. The article count is set on the IndexController and needs to be updated with an AJAX call. The event that will trigger the AJAX call is a change is device orientation, so when a mobile device goes from portrait to landscape view.
I'm able to get this to work outside of Zend Framework but since new to this MVC I'm not quite sure how to access the variable at the controller level.
So for example I have this bit of jQuery for my AJAX call:
var request = $.ajax({
type: "GET",
url: "index/get-data",
data: {tileLayout : "landscape" }
}).done(function( msg ) {
});
request.done(function(msg) {
});
And I need to update this variable that sits in the Controller and determines how many tiles are displayed:
$tiles = 15;