I, the developer, need some help from an expert on this...
My module uses hook_nodeapi - $op = alter to parse and modify some parts of a node's body.
A user of my module uses $node->content['body']['#value'] in his theme and reported that there were problems... #565358: Using the "Only link first occurance of term" option fails to work
I am currently parsing $node->body (and ->teaser too...)
@all: Is it safe and what are the implications of using $node->content['body']['#value'] ??
Comments
Comment #1
rsvelko commentedquote from a user:
---
Glossify works only if content parsing by
print $contentin node.tpl.phpI want Glossify to work with
print $node->content['body']['#value']because of my complex node template and for capability to other CCK fields.---
Comment #2
rsvelko commentedcan somebody point to some docs or explain to me - what is $node->content and why should glossify use it?
Is it safe?
Comment #3
Ivo.Radulovski commentedit should be safe using it - maybe this is the right approach for making Glossify work with cck fields too.
Correct me if I'm wrong....but if you take this you can choose all fields - so maybe in future you could decide trough the interface which of your fields are parsed through glossify
something like this
Comment #4
rsvelko commented90% sure that cck fields are in there too.
Testing if all works with changing ->body to ->content[body][value] .
Maybe content means that this element of the object comes from the content module (the name of the core module in the cck project(=package) in d6 )
Comment #5
Ivo.Radulovski commentedbut if and which cck's are parsed should maybe set-able what do you think?
Comment #6
rsvelko commentedaf kors. I strongly suppose that this in effect will lead to glossify beginning to magically work in views.
Comment #7
jcbou commentedDouble on this. It would be great. I'm using a complex template with CCK fields, so i cannot get Glossify to work with it.
Comment #8
rsvelko commentedI tried to modify $node->content in hook_nodeapi, $op = alter. Nothing happens. Only when I try with $node->body it towrks. So , postponed until someone gives advice or finds someone more knowledge-able. I've done research but in vain.
Comment #9
Fienix commentedSubscribe
Comment #10
locomo commentedsubscribe
Comment #11
kristi wachter commentedHi rsvelko,
I use $node->content extensively, and I'd like to chime in a bit.
I use $node->content to get very fine control over how content appears. A lot of my clients have very precise specifications for how they want their pages to look - there are lots of CCK fields, and they have to be arranged in very specific ways. Using $content, even with the options available on Content Type -> Display Fields, doesn't give me the level of control I need.
So, instead, my node-contenttype.tpl.php will often have stuff like this:
So, that's why I use $node->content (and $node->field_fieldname).
Now:
I took a quick look at glossify.module . I saw where you had tried working with content:
I uncommented that line, and then copied this (line 290? or so):
and duplicated it, modified, like this:
And THAT WORKS in my highly modified theme.
Before making this change, I was experiencing what others had:
* Glossify did not work with my custom theme
* Glossify did work for me in Garland
Obviously, this isn't enough investigation for me to put together a patch - but since you had asked for some additional background, I thought I'd write this up in case it helped.
Thanks!
Comment #12
Beatle88 commentedHi,
I had the same problem - glossify not working with the garland theme, and I managed to get it working to a degree with the code above. All nodes have the links except ones that I had used the Panels module on - creating a variant in the panels node template and overriding the original node template. Does anyone have any idea why this might be the case and what I could do about it?
*Update*
Missed this discussion
http://drupal.org/node/668592
Looks like my problem...
Comment #13
Ivo.Radulovski commentedThanks for the info - we will review this and have a look in the 3.x - dev version
Comment #14
cygii commentedDoesn't work for me.
Comment #15
Garry Egan commentedCould really use a solid solution for this guys. Built this monster killer site. CCK to the max. Glossify no worky which means I've been having to hand-link hundreds of pages.
Comment #16
Garry Egan commentedNo solutions presented worked for me either. Even tried version 3.x dev. Nothing. It's all setup like it wants to work...fields and issues addressed...except when you go to render the page, no links. I am using caching.
Comment #17
WorldFallz commented'needs work' is for issues with a patch.
Comment #18
WorldFallz commentedno further development for d6 unless patch is included.