How To Retrieve The Component Presentations Using DWT In Page Template Templating?

How to retrieve the component presentations using DWT in Page Template templating?

  • How to retrieve the component presentation using DWT in a Page Template where the component have neither content nor any fields in it.The component is a dummy component created using empty schema linked along with a component template on a page. I tried the following DWT code <!-- TemplateBeginRepeat name="Components" --> @@RenderComponentPresentation()@@ <!-- TemplateEndRepeat --> But I am getting the following error while running the page template in template builder.. Length cannot be less than zero. Parameter name: length at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) at Tridion.ContentManager.Templating.Dreamweaver.DreamweaverMediator.TransformValueReferences(Package package, StringReference templateReference, Regex startTagExpression, String endTag) at Tridion.ContentManager.Templating.Dreamweaver.DreamweaverMediator.TransformRegions(Package package, String dreamweaverTemplate) at Tridion.ContentManager.Templating.Dreamweaver.DreamweaverMediator.Transform(Engine engine, Template templateToTransform, Package package

  • Answer:

    Have you add Extract components from Page TBB before your DWT? Extract components from Page tbb will create "Components" package for you...

user3113876 at Tridion Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.