Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
What i'm trying to is:
- create a contenttype-template
- print some fields instead of the {{ content }} variable
What i have done so far:
- created my own theme
- with css and js files
- created a templates folder with subfolders content and layout
- copied node.html.twig and page.html.twig from the classy theme
What i want do is print some custom fields as a variable in the node-template.
in my Seven template i had a preprocess_page suggestion to load my custom css by "type & arg" and it works very well BUT in all other pages it returns the error:
<em>
Notice: Undefined index: node in seven_preprocess_page() (line 43 of [..]/seven/template.php).
Notice: Trying to get property of non-object in seven_preprocess_page() (line 43 of [..]/seven/template.php).
</em>
For a new content type in Drupal 6, I made a custom template file called page-node-blog_entry.tpl.php. I got Drupal to recognize and use this for the content type, except it also uses the exact same template instead of an edit page.
How do I set what the edit page is, and is there an easy way to just set it to be the default node edit page?
I created a new sub-theme of an existing theme. It works well, when I'm still logged as Admin. But when I log out, I can't log again as admin or as authenticated user, with the normal interface. It's says "access denied". The only way to do it is with the url "site/?q=user".
The problem doesn't happen with other themes. Any idea what is wrong and how can I fix this?