I have create a content type "machines" and I am looking to theme it. At the bottom of each "machine" I would like to create 2 buttons, preview and next. These 2 fields are entity reference of other nodes of the same content type machine.
So I have to create a loop to verify if the field is not empty.
I'm using Drupal 8 and I want one page of the site to have collapsible content sections.
I want to keep the content separate from the functionality.
What I would like to do is:
1. make the content pages (nodes), say story 1, story 2 and story 3
2. I want to have a page called "stories" where the first thing the viewer sees is story 1 expanded, story 2 and story 3 are collapsed except a title.
2. selecting story 2 would expand it.
I am building a faceted search using following modules : search api, facet api. Everything is fine. Then I've create a view to display all the products indexed in the DB. No problem. Now I want to display it as I want using a TPL file. I did it like this but the node title and the node image don't appear. I assume I am doing it wrong in PHP. Can you help me please?
PS: I am using this code for normal view and it works perfectly.
How can i render the content from the body field?
I've created a custom tpl file for a specific content type.
If i do the following for showing al my content from that node => print render($content); I get nothing. https://api.drupal.org/api/drupal/modules!node!node.tpl.php/7.x