1

I have a page that I created by View, I tried to create a template by creating node--view_page_machine_name.tpl.php, but it didn't work, the page did not change to this new template style.

How can I add more blocks/regions into a view page? Thanks.

5

In your view, under advanced there is a link called "Theme Information". If you open that up, there will be a list of all the different parts of the view that can be themed and a list of all the theme suggestions for each listed in order of broad to narrow.

You can create a theme file and naming it appropriately from the list of files in the theme information section. Once you've created the file, click on the "Rescan template files" button and the file you've created should be bold in the list.

Save the view and clear the cache.

enter image description here

1

But you don't mean the big Add button in your view which gives you the possibility to add blocks, attachements and else to your view, do you?

Be careful when you add blocks that way, you may want to override the display type, which can be chosen top left the moment you edit/add/delete a field, a filter criteria or else. Otherwise the changes will be applied to all your display types in that view.

Anyhow, I prefer to create an empty page first (via Content > Add Content > Page) and then I plant views blocks as much as I need on that page. So when I create a view I choose Block instead of Page.

And then when I'm done with creating my view I go to Structures > Blocks to choose the region and the site (the site I created first) where that block (views block) then should be displayed.

That way it's much easier I think to edit views 'cause now I have these Contextual Links on my page and when I hover over them they provide a quick link to edit the block or edit the view immediately.

  • Thank you for your reply, but that was not what I meant, this page is a view page, I want to add more stuff on this page, not the blocks that created by the same view. I actually want to style it just like they way I styled a node type of page. But thank you for your reply, I understand what you mean and that is also how I handle views generally. – the_summer_bee Aug 23 '13 at 11:06
0

Consider using panels :) https://drupal.org/project/panels. And please change title to page instead of pager, which is a very different thing!

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.