Closed (fixed)
Project:
Taxonomy Fields
Version:
5.x-1.4-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Oct 2007 at 08:51 UTC
Updated:
13 Mar 2008 at 00:36 UTC
We are using this module to output fields to make a Review type, and have fields ahead of the main content that show info like restaurent names and address, or show venue and date, stuff like that.
i've been asked to put some tags into the output so this info can be themed as a set, i.e. color box to enclose it etc.
Having looked at the code it looks like this module adds its fields into the $node->content array and returns that to the drupal core for rendering. Being ignorant of Drupal internals i don't know how to add div tags to this that'll enclose all the fields.
Could you help with this?
thanks,
b
Comments
Comment #1
boneless commentedHi
As all the fields are created individually by the field modules there is no specific template that displays them as a whole.
There are created with a specific weight that decides where to display them with other components in the node.
But you can either theme them individually or in the template that renders the content array.
In the CCK module you will find a folder theme with a short tutorial how to theme fields.
So if you always ave the same set of fields on your pages you can open the required div with the first field and close it later in another field.
The other option would be to change your node template file (node.tpl.php) and theme the output individually there.
All this assumed you are using a PHPTemplate.
Sorry for not having an easier answer, I'll let you know if I can think of something.
Comment #2
ben soo commentedSure, that's what i'm looking at. My problem is that the fields change according to what the taxonomy term is that is chosen for the taxonomy for this content type: general review type for a range of subjects each requiring different CCK fields, like a computer hardware review will use different fields than a restaurant review.
It was just easier for me to try to figure out if i could output a pair of DIV tags to encircle the fieldset.
Comment #3
ben soo commented--Thank you for this module by the way, if i haven't done mentioned that earlier. i quite enjoyed putting together a content type with it, and certainly reading through the code tells me how very large the distance is between a real Drupal developer and a bloke like me.
b
Comment #4
boneless commentedno worries, glad it's helpfull.
how important is this issue for you? send me an email on my contact page, perhaps I can help.
Comment #5
ben soo commentedHi boneless and happy holidays;
i'm reporting in over this issue. --i just don't have enough understanding of Drupal data structures to successfully hack the code (although will probably try again later: hook_nodeapi() seems to be the likely candidate), so eventually i just styled each field in a way that wasn't too disturbing to the eye and which made a box shape on the page when the fields were grouped together.
It's working OK so far.
b
Comment #6
boneless commentedField groups are now working with taxnomy fields, hope that helps you.