hi, i saw this code snippet: http://drupal.org/node/229377#comment-762161 and also this one: http://drupal.org/node/229377#comment-755309
i'm just trying to find the most appropriate and 'proper' way to edit the page.tpl - the instructions are not quite as detailed as i'd hoped, but this module is brilliant!
basically, i've got some php pages (content nodes) that display recent items in a bunch of terms, would love to have the image associated with the taxonomy appear in any such view - AND also show the image associated with the taxonomy within the individual node view (and so that 'first snippet' above appears to address this completely)...
must i create a new tpl like "page-taxonomy-term.tpl.php" (and edit the header like in that second comment above)?
sorry if this sounds so absurb, i'm just not a php-writing personality, but now that i've been sucked into the nanwich's site i'm all lost in code snippets ;)
Comments
Comment #1
nancydruThe snippet I wrote definitely works in the Garland theme for 6.1.
There is a whole section of the handbook on how and what to change in themes. It also has a bunch of theme snippets.
My snippet puts the image associated with the term in the title at the top of the page. I find it of no value, personally, because the term image is going to display next to each node any way.
I was hoping that the two new add-on features would nearly eliminate all theme changing, and most custom coding.
Sorry to suck you into my site. It's supposed to just be a helping site.
Comment #2
zilla commentedah, just a helping site but it's really great - i've spent a few hours on there this week reading through tons of stuff....
and those two add-ons do appear to remedy the goal - i'm trying to display the category image next to the title of the post when viewed as a teaser (in a list) as well as within the node (like a constant 'category symbol' for all content of category X) - that way, if somebody scrolls a vocabulary view that shows multiple terms (e.g. term/1+2+3) they'll see the appropriate symbol for each one in the listing...
btw, to clarify - are you saying that by using the add-on features, ideally an admin has to make only one change to tpl - or do you mean none? could this module hypothetically (or currently) auto-insert the appropriate code without even editing a file?
Comment #3
nancydruI was hoping no theme changes. Certainly on my sites there are none.
And I think on 6.x all the theming could be done "in the module."
Comment #4
zilla commentedgreat. will try it out today and will let you know how it works out. to clarify - for d6 version, do i still need to follow step7 in instructions txt file about editing in tpl file?
Comment #5
nancydruI doubt many people will need step 7 in either 5.x or 6.x. The add-on features should take care of 95% of those cases. I just committed an update to the INSTALL text file.
Comment #6
zilla commentedthanks - btw, i know that this is NOT a drupal install (i believe anyways), but if people need a visual to understand what a "category image" means in display (in teasers and in nodes), they could take a look at: http://thediscountbox.co.uk/discounts/goingout
once my own site is live, i'll gladly throw up a link as well (using it for one node vocabulary that's reasonably extensive)
Comment #7
nancydruI thought I had a demo link already set up, but I'll be glad to include another on the handbook page.
No, that site is WordPress, but an effective demonstration of using an image.
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.