Hot answers tagged

11 votes
Accepted

How to save edited content of a Component through a C# TBB

I sense that what you're trying to do is replace some invalid characters while publishing. You would typically do this on the Package.Output variable, not on the Component itself. Output is the text ...
Nickoli Roussakov's user avatar
8 votes

Template Building Block

Template Building Blocks are executed when you publish something. They are used to transform your content, which is stored as XML in the content manager database, to something that your web ...
Nuno Linhares's user avatar
  • 29.1k
7 votes

ECL item 'ecl:1262-cel-226-cea-file' not found

If your Publisher is outscaled onto a separate Windows server, then you'll need to make sure that the ECL mountpoints are configured correctly on that server too. I've been caught-out by that before!...
Jonathan Williams's user avatar
5 votes

Identifiableobject Xml Missing Node Info in Web 8.5 While It Exists in 2013 SP1

Apparently when you pass a Publication object to a function that takes in an IdentifiableObject GetXXX(IdentifiableObject identifiableObject), the identifiableObject's XML will have less information ...
Sabarish Senthilnathan's user avatar
5 votes
Accepted

How to consume XML sent by C# TBB in Razor template?

AFAIK, you won't be able to get the Keyword titles directly in a Razor TBB; however, you can create your own custom function in the Razor TBB that manipulates the XML and returns the titles. The ...
Sabarish Senthilnathan's user avatar
5 votes

Compounded Dynamic Component Templates

There is a change about the behaviour of the REL Component Presentation in Web 8, due to the change of the control of the target languages by the Publication Target and the new Topology Manager way of ...
Raúl Escudero's user avatar
3 votes

Find all templates that are using a specific TBB?

I just want to point out that retrieving "where used" from GUI or Core Service is completely the same. So, it wont give you any additional information. The only additional thing that you can do is go ...
Marko Milic's user avatar
  • 8,863
3 votes
Accepted

ECL item 'ecl:1262-cel-226-cea-file' not found

It looks like you have not added Resolve ECL items V2 to your Component Template TBB. In the template builder folder, you can see SDL External Content Library and named Resolve ECL items V2. Add this ...
Velmurugan's user avatar
  • 7,950
3 votes

How to consume XML sent by C# TBB in Razor template?

Piggy-backing on the answers of Saurabh and Sabarish, I would suggest doing something similar, but moving the XML processing code Sabarish suggests (with Saurabh's modification) out of the Razor ...
Tanner Brine's user avatar
  • 2,512
3 votes

How to consume XML sent by C# TBB in Razor template?

Adding to @Sabarish's answer, If you are interested in Titles only; get the lighter XML for Keyword list which only contains ID and Title. To do so you should apply the filter in your TOM.NET C# Code ...
Saurabh Gangwar's user avatar
2 votes
Accepted

package Push Item Method Encodes attribute values

If I remember correctly when using Package.CreateHtmlItem(htmlContent) (which is similar to using Package.CreateStringItem(ContentType.Html, htmlContent)) then your content will be automatically HTML ...
Bart Koopman's user avatar
  • 29.6k
2 votes

Razor Import Caching problem

What I didn't explain in the answer to Embedded Razor Templates was the reason why. What's happening is that the templates get compiled dynamically, and the resulting type is loaded in the appDomain. ...
Dominic Cronin's user avatar
2 votes
Accepted

not able to read text field value provided as default value in a parameter Schema in C# TBB

I don't think that default values in Parameter Schemas actually work. If you want default values for your TBB parameters, you should put those in your code (in case a Package item named after the ...
Rick Pannekoek's user avatar
2 votes
Accepted

Is there any standard solution for Blueprint structure to be fetched, for all publications in a CMS?

Certainly, take a look at the BluePrintNodesFilter filter in the TOM.NET API (chm). BluePrintNodesFilter Class Represents the Filter for a list of BluePrint nodes Example usage: SystemManager ...
Atila Sos's user avatar
  • 6,280
2 votes

Remove Namespace tags from RTF field Data

Welcome, Mahesh. Try the Convert XML to XHTML Template Building Block, which is separate from Default Finish Actions. Otherwise run Template Builder to confirm how your Output changes for each TBB.
Alvin Reyes's user avatar
  • 12.8k
2 votes

How to write a .Net assembly for resizing image according to layout?

To create and use Custom Dreamweaver Functions from a Razor Mediator. Refer to this below example, you can create one specific to your case. Create a custom class in C# using the TOM.NET API based ...
Velmurugan's user avatar
  • 7,950
1 vote

Remove Namespace tags from RTF field Data

Your Regex looks overly complex, but does seems to work fine on plain XHTML. However, if you're using DD4T, the XHTML will be embedded in JSON. As a result, the double quotes will be escaped (preceded ...
Rick Pannekoek's user avatar
1 vote

How to write a .Net assembly for resizing image according to layout?

As Velu says, these days it's much more common to do this in the web application, perhaps using Tridion's Contextual Image Delivery If you want to do it in templating, this is also possible. In .NET ...
Dominic Cronin's user avatar
1 vote

Can't find InheritMetadataPageModelBuilder

That's interesting! You can see that the InheritMetadataPageModelBuilder is expected to be in namespace Sdl.Web.Tridion.Data, but it actually is in namespace Sdl.Web.Tridion.Templates.R2.Data. See ...
Rick Pannekoek's user avatar
1 vote

Adding Target Groups to R2 Data Model

It works! I don't know what changed. I deleted and re-created the Target Groups, re-published the page, and huzzah - the extension data is present in the json. Thanks to all those who commented and ...
John Askew's user avatar
1 vote

Adding Target Groups to R2 Data Model

It will only generate tags if you Create a Target Group and then Add Target group with a component presentation on the page. AddTargetGroupsModelBuilder should be updated in RenderPageContent TBBs ...
Velmurugan's user avatar
  • 7,950

Only top scored, non community-wiki answers of a minimum length are eligible