I am using CCK/Contemplate for a 'magazine page' type, and reptags to pull in some commonly used text.

I have found that with my npage nodes and the default contemplate, reptags are processed, but with a replacement body template they are not, even though I am referring to the body text in the same way:

$node->field_main_text[0]['view']

In the default template ("affect body output" turned off) I get my reptags processed. With affect body output enabled, I get the right layout, but no reptags processed.

Can you tell me why, and if there's a workaround? Shouldn't the same variable contain the same thing?

Comments

AnotherHowie’s picture

Actually, I just pasted the original (header, value, header, value) template back in, with Affect Body turned on, and I still don't get reptags, so I guess at least half of the problem is that it is implied that what is greyed out in the box when you first create a template is the default template, and it isn't.

Question remains - how is that different from how the node was previously presented?

jrglasgow’s picture

In normal nodes what is in the box is what would be displayed, when you have other modules that affect the node content it all depends on which nodes are called first with hook_nodeapi(). If you could paste in your 'body variables' in <code> tags, I can take a look and see what I can figure out.

AnotherHowie’s picture

OK - is there a way to influence which random node is used for the example node, so I can get one that uses reptags (only about 30% do)?

AnotherHowie’s picture

Status: Active » Closed (fixed)

Never mind. User stupidity!

On one screen I have IE not logged in, and on the other I have FF logged in, so I can monitor changes.

Anon User has no permissions to use RepTags, which actually means Anon User doesn't see substitutions, not that they can't use them in comments, etc.

Sorry to bother you, and thanks for a very handle module!

jrglasgow’s picture

sure, and to answer your question in comment #3, the node that is loaded is the one of that type that was most recently created.

laken’s picture

Version: 5.x-2.01 » 5.x-1.9
Status: Closed (fixed) » Active

I'm reopening this, as I'm having this issue as well...

It seems like when Contemplate is enabled for a content type, the replacement doesn't work - if I disable Contemplate for that content type, the replacements start working.

I'm imagining it has something to do with when in the pipeline the replacements are actually happening, but I don't understand the internals of Contemplate well enough to see what the problem is.

Also posted in the Reptags queue: http://drupal.org/node/272959

Any ideas?