AnsweredAssumed Answered

Getting document categories in ftl

Question asked by ftoth on Mar 28, 2007
Latest reply on Mar 28, 2007 by ftoth
Hi,

I've seen various posts that sort of apply to this question, but I have not found an answer.

I'm working with "preview in template" using this simple ftl:

<#list document.properties.categories as cat>
${cat}
${cat.name}
</#list>

Parts work:

1. It goes through the loop twice, once for each category
2. The first ${cat} prints a node reference that is correct for the category

However, the ${cat.name} does not work, and I get an "undefined" error.

This appears to be the deal where I've got a node reference but not a
node, right?

But aren't node refs supposed to be promoted to nodes?

I've seen references to the need to do a search of some sort to
decode the node ref. Is that the only way?

Thanks,

Fred

Outcomes