1

As I have migrated the CM database from 2011 to Web 8.5 , there are some dwt TBB which contains RenderComponentField() function . At the time of preview the function is throwing error.

But when I tried to render the field by using the @@field_name@@ it is working fine. Is there any way to make the RenderComponentField() function to work in Web 8.5 as I can see this function is obsolete in web 8.5. Or if replace this function with @@field_name@@ will the ExperienceManager tags will work properly?

Please help!

2 Answers 2

6

As you can see in the TOM.NET Programmers Reference Guide the function Tridion.ContentManager.Templating.Expression.BuiltInFunctions.RenderComponentField is marked as obsolete.

They suggest to use FieldStartMarker(String) and FieldValueStartMarker() instead. If you want this fields to be editable from XPM this is the way. You can check the examples here.

If you just want to display the field value you can go ahead with @@foo@@ or ${foo} expressions, or with GetFieldValue function.

I recommend you to check this article in the SDL Documentation that describes how to upgrade your deprecated functionality: Replacing RenderComponentField() calls in your templates.

edit: updated links for Web 8.5.

1
  • Yes this one is working. I need to replace the function with the new one.
    – Manas.p
    Commented Jul 11, 2017 at 12:20
0

It`s working fine for me. please try dwt as below code:

@@RenderComponentField("title",0)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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