I have a view which has a page display and a block display. The block display has Use Ajax enabled so the filters show up. When I output the block display to my template using:

<?php print views_embed_view('list_disciplines', 'block_1'); ?>

It outputs correctly, and shows the filters. The problem is when I submit the filters form it redirects me to the path I have set up for the page display, and doesn't use ajax at all.

Any ideas?


Ok finally dug up my answer.


In summary, the scripts for ajax views cannot be added if you embed your view in a page template. You either have to create the view in preprocess_page or in a node template file.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.