0

I am needing to setup a view in Drupal 7 that loops through content entries with fields. The content listing page will display teasers of each entry item with only the store name, address, suburb and phone number displayed. When the store name is clicked, I want the resulting page to display all details about the store. Could someone provide me insight on how to get this setup. I have a single content item with multiple field collections that works in a similar way, but it does not provide the click through functionality. It can be viewed here: http://endlessfitness.co.nz/swim-spa-retailers.

0

For the view format instead of using teaser you can select fields. And then add those fields which you want to show. To make the titles clickable, when you will add the title field it will give an option to link it to the content. Here is the fields format option. enter image description here

And here is the field which you will need to add. The screenshot will have different fields than yours because I don't know what fields are there in your content type. enter image description here

And here is the option to link title. So when you will add title field you will get this popup enter image description here

  • Thanks. I got that working, but now I struggle with how to access the data for the content, loop through it and display it within the view. I have setup the template file and it is being recognized, but unsure of what to do next. – Mike Hermary Sep 14 '17 at 7:27
  • Sorry, I am not able to understand what you did. Can you please explain what you did and why/what template you created? – Bharat Sep 14 '17 at 8:28
  • Drupal posted a message that had suggestions for view template files, so I created one to match the content I was adding using FTP. It is called views-view--swim-retailer.php. Now that it is created, I am needing to add the for loop to display all entries and have the titles linked to individual full pages. I sort of understand the render/print content functions, but not sure of how to properly implement it. Any tips are greatly appreciated. – Mike Hermary Sep 14 '17 at 20:09
  • Views template files are used when you need to update the design of it. The loop and all other things will come from default templates. I think in your case you don't need a views template so you can remove it. Did you check my post as to how you can add fields to view. So you can decide which fields will show on your content list page. Regarding linking the titles, when you will add title field, it have option to link it to content for which I have put a screenshot also. Let me know if it is not clear to you. – Bharat Sep 15 '17 at 2:18
  • I am confused. How would I properly display a list of content items with custom fields on one page and individual content items on single pages without using a view. How will Drupal know where to look? I have also have a specific DIV structure that needs to be implemented to style the output. Without a view, this seems impossible. Please clarify. Thanks. – Mike Hermary Sep 15 '17 at 2:46

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.