More things are output than just the items I enter for the template. For example, I'm modifying the teaser code, and even if I just print "hello", the title, "Submitted by", "Add new comment" link and "Read more" link are all output.

How can I output JUST what I put in the template?

Thank you!!

CommentFileSizeAuthor
#2 Picture 3.png17.83 KBjrglasgow
Picture 8.png21.97 KB.kuma
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

I am no expert and am basing on v5 but :-

You are not theming the "title" you are theming what will appear in the body

"Submitted by", "Add new comment" link and "Read more" link

These are controled in the Theme configuration on a content type basis, again not contemplate

jrglasgow’s picture

FileSize
17.83 KB

if you go to (in your drupal install)/admin/build/themes/settings there is a section "Display post information on" with a list of node types. This determines which nodes display who posted it and when.

The only way to get rid of the other stuff, title, add comments link, read more link, etc... is to change the node type's template file. Put your template files in your theme's directory and clear you cache.

.kuma’s picture

Thank you both for the reply. I was able to get the post information to go away following your advice.

I have an idea about how template files work, although don't understand the process 100%. If a template file of some name is found in the theme directory, then it will use that? Is there a list of possible template names? Is that the link you provided? - http://drupal.org/node/190815#node-suggestion

Thanks!!

lameei’s picture

For getting rid of the title i have created a node specific template file and then removed the title variable from there. Now the title is removed from the teaser view but in full node view it is still there.

How does it possible to get rid of that?

jrglasgow’s picture

  drupal_set_title('');

This will set the title to an empty string, in the HTML the <h1></h1> tags will still be there but it will be empty.

lameei’s picture

That's it. thanks for reply.

Aren Cambre’s picture

Title: Can't control output 100% » Allow control of all node's output
Version: 6.x-0.9 » 6.x-1.x-dev
Component: Documentation » Code
Category: support » feature

Please let Content Templates handle all of a node's output, including overriding the default header and footer.

The previously proposed solutions can't work for me; I need to maintain this output for all content for which I am not specifying a content template. Also, they still allow empty <h1> tags and don't eliminate the taxonomy or Add a comment links below the body.

If this is not possible without Drupal core API changes, let me know so that I can request them separately.