Izopi4a
Izopi4a

Reputation: 500

druapl 7 custom views with custom template

I have custom views ( using views module ), which are pages where they display list of nodes ( based on taxonomy ). So i have my exmaple.com/tv-shows where it shows a list of nodes where field_taxonomy_category equals "tv-show". I have another view cooking.

Now .. i want all those lists, "tv-shows", "cooking" and rest of the categories on my website, to make a custom display. I want to change the whole html structure of those lists.

Any suggestion how to do that in a best way ? Thanks

Upvotes: 0

Views: 64

Answers (2)

MilanG
MilanG

Reputation: 7124

When you edit that view open "Advanced settings" on the right and click on "Theming information" at the bottom of opened block. It will give you name suggestions for templates you should created and override with your HTML. When you click on link at start of every template you can see actual (default) template file content so you can copy it to your text editor and then save it under some of offered names in your theme. Template name displayed in bold is currently used one. When you add your new template clear the cache (there is a link in that "Theming information" for re-checking available template files.

Upvotes: 0

FalcoB
FalcoB

Reputation: 1333

You can edit the template files of you views.

go in your view, open the advanced tab on the right side and click on theme at the very end of the listed items. There you can find possible names for your template files... copy them from the views folder and insert them with the new name in you theme folder!

after that, you can edit the new template file for your needs!

first:

enter image description here

and then:

enter image description here

Upvotes: 1

Related Questions