0

I created a new content element for the page content type.
How would I print out the content of that text area in page.tpl.php?

  • 1
    Hello Jordash; welcome on Drupal Answers. What do you mean with "I created a new content element"? – kiamlaluno Apr 27 '11 at 22:02
1

Your question hints that you're not quite yet understanding some of the basics of the Drupal CMS. I'd recommend you do a little reading about nodes, content types and paths.

The page.tpl.php template is the master page template for your entire theme. That means every page output regardless of node type or non-node page altogether.

Your node.tpl.php template is the template for specific nodes. You can create node-MYTPE.tpl.php to control a specific node type.

For further details, see Theming Drupal 6 and 7, and Drupal 6 Template Suggestions.

  • It is not necessary to change a template file, if the OP is referring to a field created through the Drupal 7 field API. It is important to understand what the OP meant with "content element," though. – kiamlaluno Apr 28 '11 at 20:41
  • I know about that but it doesn't really suit what I needed.. – Jordash Apr 29 '11 at 21:12
  • by content element I meant I have the regular page content and then another piece of content (called Sidebar), since every page on the site is going to have these two types of content it isn't necessary to create seperate node types, I'm confused on the syntax for Drupal 7 of printing out the new content field I created. – Jordash Apr 29 '11 at 21:12
  • @Jordash You should make your question clearer. – kiamlaluno Apr 30 '11 at 4:45
  • Yeah sorry i'm not familiar with all the terms, no one has really answered my question yet.... – Jordash May 2 '11 at 18:10

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.