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 ...
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 ...
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!...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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 ...
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
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tbb × 17web8.5 × 5
templating × 4
dxa × 3
2013-sp1 × 3
web8 × 3
2013 × 2
sdl-tridion × 2
c# × 2
razor × 2
dd4t × 1
content-manager × 1
dxa-2.0 × 1
ecl × 1
schema × 1
tom.net × 1
razormediator × 1
sites-9.1 × 1
blueprint × 1
dxa-1.8 × 1
elasticsearch × 1
.net × 1
dynamic × 1
caching × 1
targetgroups × 1