We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [templating]

for questions about Page or Component Templates and Template Building Blocks (TBBs)

Filter by
Sorted by
Tagged with
3
votes
3answers
8k views

How to fix the template error “There is already an open DataReader associated with this Command which must be closed first.”?

I'm facing a random error on .Net templating. There is already an open DataReader associated with this Command which must be closed first. The above error is occurring when multiple pages are ...
8
votes
2answers
426 views

Where should I put PDB file in SDL Tridion 2011 SP1 to enable debugging?

I am putting my Tridion Base Templating project DLL in the Global Assembly Cache (not in Tridion Environment). This has worked fine until now when I want to do the debugging on tridion. Earlier, ...
15
votes
4answers
3k views

Are there any sources of good study materials for SDL Tridion 2011 templating?

I have been working in SDL Tridion 2011 writing C# Template Building Blogs and Dream Weaver Templates. So far, everything I have learned has been either with help from more senior developers OR by ...
3
votes
2answers
531 views

Get the Schema title of an Embedded Schema within a Razor template?

Edit following request for clarity: I wanted to know if it were possible to get the Schema of an embedded field directly using the razor mediator. As the answers below state, it isn't. Original ...
6
votes
1answer
180 views

Is it possible to make Tridion Template Logging use Enterprise Library version 5.0?

In Tridion 2011 SP1 templating, we are using Enterprise Library for logging information to a custom log file while publishing. But unfortunately Tridion uses EntLib 2.0 which is meant for .NET ...
3
votes
4answers
266 views

tcdl is undeclared prefix issue while publishing DCP

After upgrading to 5.3 to 2011, I am getting "tcdl is undeclared prefix" and publishing fails. but this issue is with only one of the environment, in another environment its is working perfectly. I ...
9
votes
2answers
465 views

Insert youtube and vimeo video in the wysiwyg editor by replacing component link

I want to display youtube or vimeo videos on a page. I already created a specific schema and a component template so that the user can add the videos to a page via the component presentations of the ...
11
votes
1answer
732 views

Razor Templating - Addbinary (resolve binary)

Is there a function to call to resolve path of a binary? Example: This works and resolves the media.ID as a path. <img src="@Fields.asset.media.ID" tridion:type="Multimedia" alt="test"/> But ...
5
votes
2answers
592 views

Mixing JSON data and Razor in Tridion 2011 Razor Template

I'm creating a Razor Component Template in Tridion 2011. In this template I want the output to be in JSON format. Now how do I mix the two languages? JSON should be seen as HTML not as code. Example: ...
7
votes
1answer
201 views

Why does the Cleanup template fail to remove the tcdl:ComponentPresentation wrapper in publish mode?

I have a page template containing two TBBs. The first renders the component presentations, and the second is the default finish actions. The page contains a component presentation that writes an XML ...
6
votes
2answers
175 views

How to block TCDL embedded Tag in custom generated Xml

I am generating custom XML from components using a C# TBB, and on migrating from 5.3 to 2011, I can see the following additional markup in my XML. <tcdl:ComponentPresentation type="Embedded" ...
9
votes
2answers
693 views

Condition Sentence for Nested multiple Embeddable Link Field

I'm trying to implement Condition Sentence for nested multiple embeddable link field in the DW Tempate. But in the 1st Repeat sentence, I can't judge if the 2nd embeddable link field is empty or not. ...
7
votes
2answers
1k views

Component Template - Parameter Schemas (2011 SP1 HR1)

Couldn't find an explanation in the online documentation but the Parameter Schemas option on Component Templates - can this actually be used the same way parameters are used on TBBs? After adding a ...
12
votes
1answer
534 views

“Unable to get template type with legacy id” error

I am working with the XPM in Tridion 2013 at the moment. I want to change the page template of one of my pages but when I click on the drop-down, there is an error notification popping up. It says: ...
9
votes
3answers
1k views

Accessing page object in C# TBB used in the component template

Is there a way to access page metadata schema value or structure group metadata value holding that page from the C# Code fragment which is used in the component template?
7
votes
3answers
837 views

DW Template for implementing multiple text field in component link field

I'd like to know how to implement multiple text field in component link field. My situation is Component A has a single component link field "Note1". "Note1" field has a value of a Note Component. ...
5
votes
2answers
484 views

Unable to resolve links using DreamWeaver Templating

We are using the following line of code in our DreamWeaver Template to resolve a link in Tridion. But,not getting the desired output, the link is not being resolved on the page. Is there anything ...
10
votes
2answers
364 views

Publish Binary File in a MM Link Field

I try to think about what is the best practice of publishing binary file in a MM link field without coding like in the DW Template. The background of this question is that I have a couple of on/off ...
7
votes
1answer
487 views

Link Resolving with Razor Mediator

I am pretty new with Razor Mediator and of course having some issues while testing my TBBs. I am writing a TBB that renders HTML for HTML5 videos like this. <h2>@Fields.title</h2> <...
9
votes
1answer
452 views

How do I determine if a Component is Published based on the current TargetType

I'm using Component.IsPublishedInContext to determine if the Component is published but the value returns true irrespective of the current TargetType where the Component is being published to. ...
12
votes
2answers
210 views

Get StructureGroup ID in Dreamweaver

I was wondering if this is possible? Have tried following cases: Page.OrganizationalItem.ID @@Page.OrganizationalItem.ID@@ Page.Context.OrganizationalItem.ID @@Page.Context.OrganizationalItem.ID@@ ...
10
votes
2answers
376 views

Iterate through ComponentModel List

I have a Razor Template where I need to order a list of component links by a particular field in descending order (Fields.Date). Normally when I want to loop through a list I would just do something ...
3
votes
3answers
1k views

How do I, in a C# TBB, convert a TCM ID to a link?

I have a C# TBB which takes a component, and should be pushing a link into the package stack. If the component is a publication, and it references a multimedia component, the link should be a link to ...
10
votes
3answers
262 views

Updating component field while publishing does not publish the latest version of component

We are using Tridion 2011 SP1. When a component is being published we are updating a metadata field of component in our component template. The code which updates the component metadata field is ...
8
votes
2answers
1k views

DW Template for Multi Embedded Multi Component Link Field

I'M trying to implement DW Template using the Useful TBB("Get Linked Component") found the following URL. https://sdltridionworld.com/community/2011_extensions/generic-2011-tbbs.aspx This TBB have ...
11
votes
2answers
243 views

Using Function Source in Condition Sentence for DW

I'm trying to make it work to use function source(Custom Function) in condition sentence for DW Template. The Result is, In case of adding @@ to the function source in front and behind, the function ...
7
votes
1answer
418 views

Publisher not picking up template changes

I had a problem with the Default Finish Actions TBB containing the wrong namespace for some of the Parameter Schemas it referenced (but didn't use). This was causing the publishing of items (Pages ...
6
votes
2answers
83 views

Combined use of templating techniques within a single CM instance?

A client has a CM - CD environment set up and running several sites using the classic Compound Template model We're exploring the possibility of introducing a set of 64 sites into the existing CM ...
16
votes
4answers
964 views

What are the best practices to manage the sitemap for a Tridion website?

As a general requirement some/almost all of our clients require the website’s sitemap to publish automatically whenever a page gets created and published. Generally we implement this functionality ...
17
votes
4answers
498 views

Best Practices to maintain text for labels and link buttons throughout the website In Tridion CMS

How should we maintain the text for labels and link buttons throughout our website? For example, we have link buttons named “see more” on a few pages and now the editors have a requirement to to ...
9
votes
4answers
519 views

How do I remove a component template which publishes Dynamic Component Presentations?

While trying to figure out why components on one of our publications take longer to publish then on other publications we discovered an old component template that existed on just that publication. It ...
9
votes
2answers
1k views

DWT Syntax TemplateBeginIf & TemplateRepeatIndex

I am pushing keywords onto the package with keys like Keyword1Title and pulling them out in my DWT using @@Keyword{$TemplateRepeatIndex}Title@@ The problem is I want to test the contents of ...
9
votes
6answers
520 views

How to write out full Page URL in a Page Template

For every Page I want to write out a meta tag in the HTML head containing the full Page URL. How do I build up this URL including domain name? We're using SDL Tridion 2011 SP1 with modular templates.
13
votes
3answers
163 views

Templates not readily available in Tridion Content Manager

When I create a new page template it doesn’t seem to be available in Tridion straight away. That is, if I go to a page I can’t assign my new page template straight away. It does become available after ...
10
votes
3answers
1k views

XSLT Component template transformation with external images

We have Multimedia Component that works with external and internal images. When we have external images we have two cases: External Image that has query string parametes ... ex: http://yahoo.com/...
10
votes
2answers
855 views

Accessing Embedded Schema fields via list of Component Links

I have a razor component template which is looping through a list of component links trying to read out fields that come from an embedded schema. The Embedded Schema contains fields like Title, Body, ...
16
votes
8answers
860 views

Ordinal position of a Component Presentation in a DWT

I am looking for a way to generate a CSS Id for a Component Presentation, which is guaranteed to be unique within the scope of the page. My initial thought is to make use of the ordinal position of ...
19
votes
1answer
506 views

Getting additional keyword information from item Xml?

I have a very generic "GetItemXml" template building block that basically reads the current item being rendered and outputs the item's xml to the delivery tier. Component component = (Component)...