You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When front_end_layout is set, it overrides RequestHandler's setting of the layout to 'ajax' if it is loaded via an Ajax request.
I could not figure out why all of my /users/ pages had the default layout, even when loaded via an ajax overlay. I turned out it was because I set the front_end_layout setting to 'default'.
How can I utilize the 'default' layout for normal requests, and the 'ajax' layout for ajax requests, without modifying Spark Plug's internal code? That is how the rest of my site works, but I can't figure out how to use the same thing for Spark Plug.
Thanks.
The text was updated successfully, but these errors were encountered:
I found a simple way around the issue, in app_controller's beforeFilter:
if ($this->RequestHandler->isAjax) {
Configure::write('front_end_layout', 'ajax');
}
(sorry if there are mistakes, just wrote it from memory)
I closed the issue by mistake when I commented--I still think it's something SparkPlug should handle itself, however if this is the intended behavior then the issue can be closed.
When front_end_layout is set, it overrides RequestHandler's setting of the layout to 'ajax' if it is loaded via an Ajax request.
I could not figure out why all of my /users/ pages had the default layout, even when loaded via an ajax overlay. I turned out it was because I set the front_end_layout setting to 'default'.
How can I utilize the 'default' layout for normal requests, and the 'ajax' layout for ajax requests, without modifying Spark Plug's internal code? That is how the rest of my site works, but I can't figure out how to use the same thing for Spark Plug.
Thanks.
The text was updated successfully, but these errors were encountered: