maxxd Posted February 17, 2016 Share Posted February 17, 2016 (edited) Hey y'all. I'm trying to learn Drupal in an effort to steer away from WordPress, and I'm having some issues. Hoping someone here can help me out. I've created a custom content type via the admin menus in Drupal 8. Name of the content type is 'Staff Member', machine name 'staff-member'. I added a content block in my myTheme.info.yml file called 'Staff', and assigned the Staff Member content to that block in the Structure > Block Layout page of the backend. I've created and uploaded a couple template files (page--front.html.twig and node--staff-member.htm.twig) to the server. The problem that I'm having is that the data I've entered as a Staff Member data type is nowhere to be found. My page--front.hmtl.twig template is as follows (simple enough): <p>This is the front page. hooray</p> <pre> {{ dump(page) }} </pre> At the bottom of the dump, I see my custom blocks - including 'staff', which contains no data. If I change page--front.html.twig to the following: <p>This is the front page. hooray</p> {{ page.content }} the page spits out some of the Staff Member data in the content section. Unfortunately, it doesn't appear to be using the node--staff-member.html.twig template to display the data. Clearly I'm missing something here, I just can't figure out what that something is. Any ideas would be greatly appreciated as I'm starting to run thin on hair from pulling it out over this. I've found a trillion and four tutorials on creating a custom content type, but not one of them goes into detail about how to display the custom content type data... I've cleared the Drupal cache a million and seven times. Edited February 17, 2016 by maxxd Quote Link to comment https://forums.phpfreaks.com/topic/300832-drupal-8-confusion/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.