By patrick_IRE on
Hey all,
I have created custom content type in which I have created custom fields using CCK. I would like to specify the location within node.tpl.php for one of the fields, with a Name of 'field_author', so I can control the look of those specific content node pages. I would like all of this specific content type's pages to display the field also.
I'm a designer with advanced html/css but limited php knowledge
Any suggestions?
Thanks,
Patrick
Comments
Article
Hello Patrick -
It's still a rough draft, but this page of the article I'm currently writing may be helpful to you:
http://www.davidnewkerk.com/book/30
Please feel free to comment on the article here, letting me know if it has helped you understand, or if it was too confusing (it's my goal to perfect the guide to be easy for everyone to grasp). All feedback is welcome.
-- David
absolutecross.com
Alright
David,
That did help a little but I am trying to edit the /taxonomy/term/* areas nodes specifically so that I can show a teaser that i've created within CCK. For some reason with CCK_teaser_module, once you click on the story within the term area (/taxonomy/term/20) it will take you to the node page and that page will still show the teaser above the body, which is what I am trying to get rid of also. I would really like to be able to show my CCK fields in a completely customized way.
It was slightly confusing because when you show this code:
print $node->field_article_subtitle[0]['view']the name being "article_subtitle" is that the "Name", "Label" or the "Type" as specified within the managed fields area (/admin/content/types/feature/fields)?
"Name" is hard to differentiate whether you mean the 'Type' name or the 'Name' name at the url below
/admin/content/types/your_custom_content_type_name/fields
Thanks,
Patrick
Clarifications and more info
Hi Patrick -
I've added some additional clarifications to the mentions of the field names (including the menu path to follow to reach the exact page that lists the field names being referred to). Let me know if this helps. Keep in mind this page is a sub-page of a larger article overall, so may have some degree of "assumed knowledge" based on what was taught earlier within the same article (the article is made to be an A-Z step by step guide taking a beginner from knowing next to nothing on the subject, up to at least intermediate knowledge of CCK, Views, and Theming).
I'm not the biggest fan of the CCK Teaser Field module (the lack of an official 5.x release, and no hint of a Drupal 6 port is enough to cause me to steer clear, other issues with the module aside). I prefer/recommend making a simple CCK text field for this purpose, but it's up to you. I recommend reading the Creating a custom Content Type with CCK section of the article, which explains how to make the teaser field (the article uses CCK 2 for Drupal 6, but mostly the same in D5). The Views section after it explains how to make use of the field... it's a Views 2 guide, but if you're familiar with Views 1 already you'll be able to get the idea and make it in Views 1.
The Setting up how the fields “Display” (on the full page) part of the article (scroll to the bottom of this page) will show you how to get rid of the teaser field when the full page is viewed.
You can override the display of Taxonomy listings using Views module if you'd like. There is a default View included called "taxonomy_term" which you can "Add", which will then override the normal Taxonomy pages with a customizable View to preform the same task. I wrote a guide a while back that might help: HowTo: Theme Taxonomy Term listing pages using Views
Let me know if that helps.
-- David
absolutecross.com