Drupal 6 embed view in node template


















Create a free Team What is Teams? Learn more. How do I embed a view inside a node? Ask Question. Asked 10 years, 2 months ago. Active 2 years, 4 months ago. Viewed 28k times. What is the function to embed views in drupal 7? Improve this question. Natkeeran Natkeeran 1 1 gold badge 3 3 silver badges 8 8 bronze badges.

According to this documentation link of views module this function is equally available on Drupal 6 and 7. Add a comment. Active Oldest Votes. In Drupal 7 you can use this code. Improve this answer. Dave Dave 91 1 1 silver badge 2 2 bronze badges. To display a view in a node template, you use the following code. Cyclonecode Cyclonecode 3, 26 26 silver badges 47 47 bronze badges.

I am developing a module to display video. I have created a view so-called navigation for the user to select a video from a list. I don't know whether I should create a template for it then I have to put the template file in theme folder which is not so good or use some kind of hooks I haven't figured out which one to use? I want it to be on top of the title. Sounds like you'd just create the navigation block any number of ways, and tell the block to only show on video node types using php in the display rules.

Create a template specific for your video node type: node-video. If you don't want to do it via template files, the Panels module can be used to have different layouts per node type. I finally found how to implement a view as block simply select block as a content view and I use this code below to display a block in a certain node type.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 11 years, 5 months ago. Active 11 years, 4 months ago.

Learn more. How do I embed views in node template Ask Question. Asked 5 years, 10 months ago. Active 5 years, 10 months ago. Viewed 2k times. Please how can I embed a view in a node template like node--blog--full. Is there a better way to embed views in D8 node template? How can I use views-embed-view correctly in D8? Many thanks. Improve this question. Add a comment.

Active Oldest Votes. Also, how do you call the function? Which parameters do you pass? Improve this answer.



0コメント

  • 1000 / 1000