Derek Carlisle
Derek Carlisle

Reputation: 485

Drupal 7 Theming a view

I've created a views called event which lists all 'event' content type pages, however I want to style the list by adding a "read more" button as well as other styles. I have created a blank template called views-view--event.tpl.php and I can see now that this is used because the view no longer lists the pages, instead it is blank (as expected). However, how do I now add the pages back in? I.e what php variables etc can I access from here? I've tried to echo a simple $title but this doesn't work. Is there a global variable that I can access? If so, what is it? I simply want to replicate what the view was doing before I created the template but with the ability to style it how I wish.

Upvotes: 1

Views: 3877

Answers (1)

davidgmar
davidgmar

Reputation: 568

Go to your view display and look at the bottom of the "advanced" column. You'll see something like "Theme : Information". Try to locate your template name and click on it to get it's base code.

Upvotes: 4

Related Questions