Hot answers tagged

17

Coming from a mixed content delivery (ASP.NET) and business analyst background, I've been interested in the same type of resources. I've typically followed the Tridion community, asked questions, and shared what I've learned. Here are some posts I've shared along with my favorite public sources that explain approaches and include much appreciated context ...


12

The Tridion practice project is explicitly aimed at gathering together good examples of different areas of Tridion practice. In the cookbook section, there's an entire "chapter" about compound templating. Maybe this can become an even better resource if more people are aware of it and help with their own contributions. (It's Free... under an MIT license.) ...


10

In an Assembly Template Building Block you can determine the RenderMode and PublishingContext via the engine. But before checking what Publication Target the current item is being published to, you need to know if you are actually being published, or if the render action of the Template is just a preview. if (engine.RenderMode == RenderMode.Publish) { ...


10

You have not impersonated the Core service client call with your Identity. As per my experience, I won't suggest to use administrator access to impersonate and do processing the request. Example: SessionAwareCoreServiceClient ProxyClient = new SessionAwareCoreServiceClient("wsHttp_2011"); ProxyClient.Impersonate(HttpContext.Current.User.Identity.Name);


9

Dynamic Component Linking is a Content Delivery feature, not a Content Manager feature. You cannot create a component link when publishing, only when serving the page on the Content Delivery side. Please explain what you mean with component is a publication Components are components, publications are publications. Or is publication a content type/...


9

Well... if Tridion had the resources (and following) of Microsoft, I'm sure you would have such books. Since Tridion/SDL doesn't have those resources, we have to be creative and (maybe) write one ourselves. The best start is probably to go through the CHMs (available for download here - login required), not everything is fully documented but it is improving ...


9

I am going to make my answer a little broader than DWTs/c# TBBs and instead address the wider availability of study materials for Tridion 2011. As Nuno mentioned, there are not any books like the Wrox Professional series of books on .net for SDL Tridion. However, in addition to the documentation on SDL Live Content Nunos has linked to in his answer, there ...


8

Welcome to the wonderful world of Tridion... Get ready to go through this cycle a few times in the coming months. Here's a couple of examples to achieve some of what you're searching for - but not all. Tridion does not store the information you're searching for in the CM, it's only available in Content Delivery - unless you want to do some date comparisons. ...


7

I would advise against publishing code from Tridion (although it's possible) and instead put all your code in assemblies and deploy them with the application. In your ASCX Dynamic Component Presentation you would then reference the type that represents your code behind. Since you mention a Tridion ASCX control, it means you are thinking of Dynamic CTs, ...


7

OData is a self-descriptive service, meaning that if you look at http://blah.net/odata.svc/ you will see a list of entities that the service will return: The collection of entities you're interested in is the last one in the list above, i.e. 'Templates'. I think this is the query you're looking for: http://blah.net/odata.svc/Templates(PublicationId=18,...


7

Ok, It seems it's been a while since I wrote code... it is quite simple, here the solution: Get The keyword From the Keyword, get its TaxonomyURI Now using the API, get the keyword with its children: rootkeyword = factory.GetTaxonomyKeyword(kwdOrCatURI); //rootkeyword.TaxonomyUri rootkeyword = factory.GetTaxonomyKeywords(rootkeyword.TaxonomyUri, ...


6

There is a NamespaceURI property but unfortunately it's read-only. So it looks like you will need to use UpdateXML to set it. For that, you would probably have to specify the full XSD -- so you might want to do that after updating all of the fields.


6

As Peter mentioned in his comments that your question is unclear. But if I consider your last comment which says its a "Object Reference" error, So I think it would be best to check the Objects Variables if those are NULL (a normal C# programming practice) before using them. so please check objects like currentComponent, linkComponentFields , ...


6

I'd cover all bases and check if the schema field exists (what if someone renames this later or you decide to allow another schema that only has some of the currently covered fields)... linkComponentFields.Component("linked_component") exists and then ensure that linkComponentFields.Component("linked_component").Id has a value. var xmlLink = string....


6

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/slashesand.dots" var folder = (FolderData)client.Read("tcm:233-49109-2", new ReadOptions { LoadFlags = LoadFlags.WebDavUrls }); var webDavUrl = folder....


5

This will get you the item CoreServiceClient.Read("tcm:xx-xxx-xx", new ReadOptions()) If you expect a certain item type you can get the item specific data var page = (PageData) CoreServiceClient.Read("tcm:xx-xxx-xx", new ReadOptions()) Getting the version The version will be something like var item = CoreServiceClient.Read("tcm:xx-xxx-xx", new ...


5

The schema has (at least) one mandatory field named "Configuration", and your code is not setting any field values, so the content fails XML validation. You need to add content to your componentData.Content and make sure it's valid according to schema before you can save it. Check if publicationData.Content includes the "Configuration" field?


5

I'm not sure the "field builder" approach was available before SDL Tridion 2011. Consider adding an option to select items by copying an example from PowerTools, otherwise a Custom URL or GUI Extension are other ways to change the component editing form itself. Selection in a 2009 Extension The R5.2/5.3/2009 PowerTools has examples for selecting items. For ...


5

Is there something in the SDL Tridion RTF field that you don't like, or do you have an external application that you are using to update the components? It's possible to extend the CKE with your own functionality (see here). I suspect it wouldn't be too difficult to integrate the Item selector power tool (From the SDL World site) into the CKE. Update: I ...


5

First of all you should decide which is the best technical approach for your requirement. I understand from your question that you just need to show a Drop Down List so I will assume that you just need to add a <asp:DropDownList></asp:DropDownList> entry in your page, then you need to consider 2 things. Is this Drop Down going to be available ...


5

Other than V2012 being a superior product to VS2010 enabling the developer to be more effective, there is no advantage specific to Tridion TOM.NET-related or Content Delivery-related development.


5

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 recursion yourself. I suggest you try and dig up whether such limitation is mentioned in the API (.chm file). I personally have also ran into some limitations with ...


4

Rather than building the component manually, a more robust approach is to request the default information from Tridion using client.GetDefaultData(ITEM_TYPE, CONTAINER_TCM_ID); This is create the component based on the container, populating all mandatory fields with the default values. So in your case something like var publicationData = client.Read("...


4

On Tridion 2009 you should use the TOM Interop APIs (COM) which are provided under Tridion\bin\Client\PIA. You'll need to use the Tridion.Interop.TDS.dll and Tridion.Interop.TDSDefines.dll. Create a new Tridion session with code like this: TDSE tdse = new TDSE(); If the current Windows user is a valid Tridion user, then it will just work. If it's not it's ...


4

Dominic Cronin, Quirijn Slings, and Andrey Marchuk developed a Tridion Template Testing framework called T-Cubed that may be of some assistance: https://github.com/DominicCronin/T-cubed It's mainly for unit testing templates - so it may not be super helpful for C# that's using TOM.NET, but it's a place to start.


4

Have you seen the GetComponentTemplateUris TBB in this open source set of TBBs on SDL Tridion World - if not, that will probably help you.


4

You could also create a Tridion Custom Deployer and then 'publish' the content from Tridion into IBM WCM. The advantage of this approach is that you can use the Tridion Deployer Java APIs and also your favorite Java IDE and ceremony. The format of the data will be what the Tridion template produces. So, for example, if your Tridion template produced XML (...


4

Let me use an explicit but hypothetical example to add an answer. It looks like a "Parent" is a News Topic or event of sorts, which can have individual News Stories. For example: /News/Weather/Default.aspx /News/Weather/SanDiegoRain/Default.aspx So the requirement is to know or maybe render something related to "Weather" while on the "San Diego Rain" page? ...


4

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); KeywordField keywordField = (KeywordField)fields[fieldName]; Keyword keyword = (Keyword)keywordField.Value; return keyword.Title;


4

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 (from how I understand about it in comparison to Blueprinting), it is probably best to apply localization sparingly. Community member Manuel Garrido even ...


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