Allow control of all node's output
.kuma - September 30, 2008 - 00:38
| Project: | Content Templates (Contemplate) |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
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!!
| Attachment | Size |
|---|---|
| Picture 8.png | 21.97 KB |

#1
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
#2
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.
#3
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!!
#4
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?
#5
<?phpdrupal_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.#6
That's it. thanks for reply.
#7
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.