Hot answers tagged

6 votes

sometimes _client.IsExistingObject(id) returns false for . and /

Are you escaping your WebDAV URLs correctly? Try loading your folder by ID and checking it's locationInfo.WebDavUrl property to make sure you are. e.g: //created a test folder named "testfolderwith/...
David Forster's user avatar
5 votes
Accepted

CoreService filter with SchemaPurpose and Recursive not working

As Rick mentioned in his comment, it might be that what your trying to achieve is not possible within a single call due to limitations of the system. If that is the case, you will have to do the ...
Atila Sos's user avatar
  • 6,290
4 votes
Accepted

How to Properly Dispose TopologyManagerClient?

In general all objects having any interaction with unmanaged resources should be disposed. With the CoreServiceClient (CS client) it's obvious and easy to do (see Tridion 2013 SP1 Core service timeout ...
Atila Sos's user avatar
  • 6,290
4 votes
Accepted

Read TCM IDs of multi-value embedded field using .NET Core Service script

The key here is that, while for regular fields, the Value (or Values) property will give you the value of the field, but for embedded schema fields, you should use the SubFields property. This will ...
Harald Hoffelinck's user avatar
4 votes
Accepted

"Sealed" Keyword Equivalent/Similar functionality in Tridion | Stop Inheritance from Parent Publication to Child Publication

I'm going to answer off-topic, at least to give some context here. Like David and Rick said, the answer is "no." But similar to the "favor composition over inheritance" object-oriented design pattern ...
Alvin Reyes's user avatar
  • 12.8k
4 votes
Accepted

c# Tridion 2011 How to get metadata selected keyword from a component

The KeywordField is the field itself, not the chosen Keyword. You need to get it's value... something like this: ItemFields fields = new ItemFields(component.Metadata, component.MetadataSchema); ...
David Forster's user avatar
4 votes

How to retrieve GUID from files for Tridion docs SP2 via WCF?

Let me clarify to help you with this. SDL Tridion Docs comes in different WCF endpoints for different services. Here is the list of WCF services available and Web Services classes and methods refer to ...
Velmurugan's user avatar
  • 8,075
4 votes

What is the recommended best practice for C# Workflow using External Activity for Logging and Configuration?

I normally add it GAC on the CM server and on publisher machines. It is so widely used (because it is standard now) that it makes sense to have it there (to be system-wide available). There are quite ...
Marko Milic's user avatar
  • 8,863
3 votes

how to get a string by using substring?

Without knowing more about what you are trying to do, the simple answer would be: you don't split the XML into strings. You parse it as XML and extract the data that you want. So, for instance, here'...
Peter Kjaer's user avatar
  • 19.8k
3 votes

"Sealed" Keyword Equivalent/Similar functionality in Tridion | Stop Inheritance from Parent Publication to Child Publication

You can prevent localization (in certain Publications) using security: you can set (un)localize permission on Structure Group level. Stopping inheritance/sharing is not possible.
Rick Pannekoek's user avatar
3 votes

Tridion.Logging missing one of its dependencies

Seems like you are referring to the wrong version of Tridion.Logging dll (Tridion 2011 instead of the one from Tridion 2013). Please check the Tridion.Logging.dll versions for Tridion 2013 they ...
Kunal's user avatar
  • 1,485
3 votes

DXA Issue mapping ComponentLink fields to Model c#

Looks like you have using vocab = "http://schema.org/", but I'm not sure did you create the specifying semantics on those schemas as mentioned in this document reference Otherwise, you can switch to ...
Velmurugan's user avatar
  • 8,075
3 votes
Accepted

Which is better performance wise : Razor TBB or C# TBB?

The advantage of having it in Razor or DWT is readability of HTML. If you dump it all into a dirty C# TBB, you'll be coding all kinds of escaped strings with HTML - PITA to read/maintain/update IMO. ...
Nickoli Roussakov's user avatar
3 votes

sometimes _client.IsExistingObject(id) returns false for . and /

We found out that actually this is a bug in system. We contacted SDL customer support and they verified that its indeed so. For example, if folder has dot in its name (.), IsExistingObject will return ...
Marko Milic's user avatar
  • 8,863
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,290
2 votes

DXA 1.7 .NET How to get Target Groups in PageModel

In DXA 1.x you can use the DD4T TBB AddTargetGroups to add Target Group Conditions to the DD4T Data Model (what Velmurugan and Harald are referring to is the DXA 2.0 equivalent of this TBB which works ...
Rick Pannekoek'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

How can I get a Localization object to query a different Publication

Although your use case is still not really clear (and thus it is not clear if your really have to use cross-Localization logic), there is a way to ensure that a Localization object retrieved from ...
Rick Pannekoek's user avatar
2 votes

"Sealed" Keyword Equivalent/Similar functionality in Tridion | Stop Inheritance from Parent Publication to Child Publication

No, there is no way to prevent Blueprinted (i.e. Repository Local Objects) from being inherited or localised. This is one of the 'rules' of BluePrinting. You can, of course, control who is able to ...
David Forster's user avatar
2 votes
Accepted

"OutputStream is not available when a custom TextWriter is used" error when returning FileStreamResult through a view with @Html.DxaEntities()

But why do you inherit from DXA's BaseController? Why not have a "regular MVC controller" which would return the relevant data? I think you should approach this the following way: Render the ...
Atila Sos's user avatar
  • 6,290
2 votes

Event Handler get the user who throws the event

Try using Session.AccessToken.GroupMemberships. In general, Session.AccessToken provides access to the CM Access Token, which may look like a regular User object (class AccessToken inherits from ...
Rick Pannekoek's user avatar
2 votes

Event Handler get the user who throws the event

Even if you can do this using an event, you should first consider whether it is better to use Target Type permissions to manage this. There you can explicitly determine which users/groups can publish ...
Dominic Cronin's user avatar
2 votes
Accepted

C# how to add values in ItemFields inside EmbeddedSchemaField of a STUB component

EmbeddedSchemaField.Values is a collection of ItemFields objects (one for each value). If you have an optional embedded field, it will initially not have any values, so indeed EmbeddedSchemaField....
Rick Pannekoek's user avatar
2 votes

Restrict publishing of Linked component within Parent Component using C# Template

OK, so here is the catch. You are working with dynamic components. Just like your main component is rendered separately from the page it is in, the same applies to your linked components. Your linked ...
Marko Milic's user avatar
  • 8,863
2 votes
Accepted

SDL on save component check the values in c#

I wrote a few blog posts about this back in the day, you have a few options. Check this article series: Validating Content on Save: part 1 Validating Content on Save: part 2 I can't seem to find ...
Nuno Linhares's user avatar
  • 29.1k
1 vote

Event Handler get the user who throws the event

I finally get the solution with comments above. private void SubScribe() { EventSystem.Subscribe<StructureGroup, PublishOrUnPublishEventArgs>(OnPublishTransactionPublish, ...
Ignacio Tome's user avatar
1 vote

Event Handler get the user who throws the event

I don't think this information is available in the event you are trying to implement. Have you considered implementing the save event for the PublishTransaction instead? For example: // ... ...
Quirijn's user avatar
  • 6,787
1 vote

How to make a publishing object fail when some custom validation criteria is not met using SDL Tridion publish plugin

Welcome to the community Roopesh. I am assuming that you are asking for content validation for SDL Tridion RTF Fields. If this is related to UGC, you can refer the SDL live documentation.. You can ...
Shiva's user avatar
  • 2,168
1 vote
Accepted

Get MIME Type of Multimedia Types based on file extension using TOM.NET (.NET Templating)

Final I got solution MimeType based on file extension and code below. > // @ExternalUrlTridionFields - Tridion ExternalUrl Field Name // > Engine engine string FileExtension = string.Empty; ...
Sudhakar Rao's user avatar
  • 1,771
1 vote
Accepted

Does DXA support Extended Keyword Models?

The solution I mentioned in the question seems to be the answer. I have created a pull request in order to introduce the fix and potentially get hotfix out of it. https://github.com/sdl/dxa-web-...
Jaime Santos Alcón's user avatar

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