0
votes

I have created a custom theme and then created a view and later on created multiple pages from same view and filtering data based on category and adding link for each page in view into main navigation. I have set site main page url to master view page, and its fine by the way I have a different layout for front page so I created file "page--front.tpl.php" and then I created "page.tpl.php" to cater extra view pages because they are having different layout from main page, everything is ok, until i got stuck with following issues.

view on main page is having list of products from all categories and once you click it will take you to the product detail page, it is taking but

1 - How to change the layout (theme) for detail page as it is having different layout (I know in normal circumstances we can achieve this by page--nid.tpl.php but I am having lets say list of 100 products, I hope you got my point)

2 - And if there does some template file exist to achieve above mentioned goal then how can I style each field of detail page, I mean how can I access individual fields in detail page.

1

1 Answers

0
votes

It sounds to me like you might want to read up a bit more on Drupal's template system to figure out which templates to override. I think the information you are looking for is found in this post about Template Files.

Rather than modifying page-front.tpl.php, consider creating a template for your Views page(s). Here's an excellent tutorial about how to theme views, and here's another guide, and one more that goes into detail.

To change the look of the product detail page, you will likely just want to create a product details template, something like node-product-detail.tpl.php. This will be clearer after reviewing the links about Template Files above.