4

I have a question about DWT in Tridion 2013.

I have a component with field (RTF) "Description". In Tridion 2009 I wrote @@Component.Description@@ and I got a content from this field. But when I try to use such expression in Tridion 2013 I get Description from Schema of current component.

Can somebody explain what was changed between versions?

I know that I can get right content from my field using this expression:

@@Component.Fields.Description@@

Thanks

5

@@Component.Description@@ is a shortcut which in 2009 mapped to the only available Description field, which was your text field.

In 2013 (possibly already in 2011) they introduced a bit more content in the SDL Tridion Template Expression Language via the Dreamweaver Mediator. One of those were the description fields of a Schema. Hence that now @@Component.Description@@ will map to the @@Component.Schema.Description@@ field.

In my trainings I always advised against using the shortcuts, since it was up to the logic of the mediator to determine which field you would get (and even way back on R5.3 I told people that this would possibly change in the future, and it seems I was right about that). So when you need a field from a Component, you are always advised to get it via the Component.Fields collection.

| improve this answer | |
  • 3
    I also did quite some work using the expression evaluator when I worked on the DGX, and can confirm that indeed it will resolve a field much faster the more qualified that field is - Component.Fields.FieldName will resolve faster than Component.FieldName. Not very different from XPath's //fieldname vs /element/fieldname – Nuno Linhares May 18 '15 at 11:42
  • Okay, I got it. Thanks a lot Bart and Nuno ) – Pavel Zhukov May 19 '15 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.