Questions tagged [tom.net]

The .NET Tridion Object Model (TOM.NET) is the recommended interface to the Content Manager for developing templating, event handling and Workflow (except Automatic Activities).

Filter by
Sorted by
Tagged with
19 votes
1 answer
530 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)...
Nuno Linhares's user avatar
  • 29.1k
15 votes
4 answers
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 ...
R.C's user avatar
  • 926
13 votes
2 answers
830 views

Insert List into a package

I have a TBB.Net that insert some items into the package. I need that this TBB.Net inserts all the items in a List of items and then insert this list in the package, but with the PushItem method I ...
tridionero's user avatar
11 votes
1 answer
204 views

How to check a TCM URI is valid without raising an exception?

Is there is some way in the TOM.NET API to check if an item exists (using TCM URI or WebDAV URL) without raising an exception?
Will Price's user avatar
  • 16.4k
10 votes
1 answer
401 views

How to determine type of Schema?

I am trying retrieve a list of Normal and Multimedia Schemas from a given Publication context. So far I have: RepositoryItemsFilter filter = new RepositoryItemsFilter(engine.GetSession()); filter....
Nickoli Roussakov's user avatar
10 votes
1 answer
103 views

Why am I sometimes having issues retrieving the page template title when using a page save event in the initiated phase?

We're using an event to manipulate the file name of a page before it is saved on a Tridion 2011, SP1 HR1 installation. We've actually been doing this for years ever since we first implemented ...
Glenn Stevens's user avatar
9 votes
2 answers
196 views

TOM.NET API - create Session in custom Translation Manager event handler

I'm using a custom event handler to generate an email when the status of Translation Jobs changes to InTranslation and Completed. EventSystem.SubscribeAsync<ITranslationJob, ...
Neil's user avatar
  • 6,698
9 votes
1 answer
178 views

How can you tell the difference between a text and rich text field with TOM.NET

From within my (2011 SP1) TBB I need to know when a TextField object is rich text or plain text so I can process the contents differently, but I dont see any simple way to find this out. Is this ...
Will Price's user avatar
  • 16.4k
9 votes
1 answer
484 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. ...
Kunal's user avatar
  • 1,485
9 votes
2 answers
370 views

Efficient way to get published pages in 2013 SP1

I want to get all published pages to a specific publication target within a specific publication. In Tridion 2013 SP1 there is this static method to do so: Tridion.ContentManager.Publishing....
hoang's user avatar
  • 523
8 votes
4 answers
975 views

How can i check if a page is published?

I want to check if a page is published or not. TDSItems listPage = SGroup.GetItems(ItemType.ItemTypePage); foreach (Page newPage in listPage) { tcm = newPage.Info.ID; } I can see info ...
tridionero's user avatar
8 votes
2 answers
237 views

Retrieving Multimedia Component from TBB Parameter

I am trying to grab a multimedia component which is linked as a parameter to a TBB. Typically I am just grabbing strings passed in as parameters such as below, however I am unable to find a way to do ...
Josh Hebb's user avatar
  • 2,920
8 votes
2 answers
356 views

What kind of API should I use to create components in Tridion 2009 using an ASP.NET project?

I'm looking for information on how to create and publish dynamically components in Tridion 2009. What kind of API do I need and are there any tutorials around to get started with it?
Arn a's user avatar
  • 95
7 votes
2 answers
179 views

In the Event System what is the easiest way log all items deleted when an Organizational Item is deleted?

I was writing some code to log User, Id and Webdav when an item is deleted from the CME. My issue is around Organizational Items. Within the DeleteEventArgs I can see that there are 'N' ...
Chris Curry's user avatar
7 votes
3 answers
399 views

Get shared pages using localized component

I'm currently working on a event handler. This will, on a save-event, save the latest revision date of the page and its components into a custom database. It is working, but I'm facing some ...
Berka's user avatar
  • 171
7 votes
2 answers
196 views

Which AddBinary methods to use?

The TOM.NET API has quite a few AddBinary methods and overloads: RenderedItem.AddBinary (+ 7 overloads) TemplatingRenderer.AddBinary Engine.AddBinary Other than the different method signatures is ...
richeym's user avatar
  • 502
7 votes
2 answers
107 views

Reading Tridion Items During Event System Extension Initialization

I am trying to read a component when an event system extension is first initialized in an 8.5 instance. So in my event system extension's constructor, I try to get the component from the Administrator ...
Sabarish Senthilnathan's user avatar
7 votes
1 answer
194 views

Checking if a keyword has classified items globally

I am working on an event to delete unused keywords, however I am running into problems determining whether or not a keyword is used for classification across any of the publications. We are using ...
Josh Hebb's user avatar
  • 2,920
7 votes
2 answers
257 views

UsingItemsFilter not filtering result for publication context

In my c# tbb, I am trying to fetch all the components using the particular keyword in a publication context. The code which I am using is: UsingItemsFilter filter = new UsingItemsFilter(pub.Session) {...
Mukesh Kumar's user avatar
  • 4,074
7 votes
1 answer
5k views

An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) (System.BadImageFormatException)

I'm trying to deploy our .NET web application using Tridion Delivery API to a local dev server. The machine is x64 and has a proper cd_licenses.xml file and the cd_*_config.xmls are all pointing to ...
user2300379's user avatar
7 votes
1 answer
239 views

Using a known WorkItem ID, how does one get the workflow version of the item (component) in TOM.NET?

Given a WorkItem ID (e.g. "tcm:x-y-131200"), what is the proper way to get the workflow version of the item (component) in TOM.NET framework? The following does not seem to return the workflow ...
libpcap's user avatar
  • 119
7 votes
1 answer
205 views

How to check publishing or rendering context using TOM.NET in the new publishing framework

With regards to publishing and rendering in TOM.NET, I know the following is true for the legacy publishing framework (pre Web 8): Template Builder PublicationTarget is null, RenderMode is ...
Bart Koopman's user avatar
  • 29.6k
7 votes
3 answers
214 views

Facing issue with our Tridion eventing module on component save and close with multiple user

I am facing some issue with our Tridion eventing module. Please let me explain the issue. Background: We have approx. 70-80 users who create content via CMS where it’s expected that more than 70% of ...
user36299's user avatar
  • 543
7 votes
1 answer
140 views

SearchQuery's modifybefore and modifyafter property will cause query error

We are trying to use SearchQuery to get a list of components inside our C# TBB. Below is the code: SearchQuery sq = new SearchQuery(session); sq.IsPublished = true; sq.ItemTypes.Add(ItemType....
qchen01's user avatar
  • 1,060
6 votes
3 answers
429 views

Converting value of XhtmlField according to FilterXslt

I'm copying components between versions of essentially the same schema, of which the latter has a stricter XSLT attached to it's RTF field. The code (TOM.Net): value = ((TextField)oldField).Value; ...
esteewhy's user avatar
  • 509
6 votes
2 answers
239 views

Engine.PublishingContext: RenderContext.ContextItem , ResolvedItem and RenderedItem differences

What is the difference between the 2: Engine.PublishingContext.RenderContext.ContextItem and Engine.PublishingContext.ResolvedItem ? Seems Engine.PublishingContext.ResolvedItem is usually used to get ...
R.C's user avatar
  • 926
6 votes
2 answers
613 views

How to access the nested embedded mutlivalue schema fields in C#

I have three Schema X is content schema , Y is Embedded schema , Z is also Embedded schema. schema z is embedded within schema Y i.e also embedded schema Schema X have field called Heading Schema Y ...
k951's user avatar
  • 85
6 votes
1 answer
173 views

Razor templating in Xview framework

I saw the presentantion on xview on the TDS and i really liked it. Is it possible to use a regular razor view and pass the model to the view from the controller so i can use it like this? Hoang Chu ...
Marlowe Antonius's user avatar
6 votes
1 answer
97 views

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

We are upgrading to Web 8.5 from 2013 SP1 and noticed the TOM.NET API on the C# TBBs by default behave differently on Web 8.5 as opposed to 2013 SP1. We have a C# TBB like this: IdentifiableObject ...
Sabarish Senthilnathan's user avatar
6 votes
1 answer
143 views

User.GroupMemberships does not return groups mapped through LDAP

I wrote an event system module which needs to find out if the current user has access to a certain folder. It does this by examining the GroupMemberships of the user and comparing those to the ACE (...
Quirijn's user avatar
  • 6,767
5 votes
3 answers
692 views

What is the equivalent of Tridion.ContentManager.TcmUri in the CoreServiceClient DLL?

The TcmUri class is a handy tool, for example to grab the publication id from a component id. string publicationId = new TcmUri(new TcmUri(componentId).PublicationId, ItemType.Publication); How ...
Jan H's user avatar
  • 8,836
5 votes
6 answers
1k views

How to retrieve parent component object from a localized component using Tom.Net API?

I have a localized Component in one of the child Publications. I would like to know the parent Component from which the current Component has been localized. This code will be executed in an event ...
User344's user avatar
  • 731
5 votes
2 answers
112 views

Getting the user who clicked publish in tom.net during publish

I need to log the user who clicked publish on an item. I can't use an event system(technical restrictions), so I thought I would create a TBB which would simply write to a txt file during publishing. ...
Atila Sos's user avatar
  • 6,280
5 votes
2 answers
161 views

What is returned when I do .GetItems() on a structure group?

I understand that .GetItems() will return a list of items within a structure group, but exactly what items can I expect to see in that list? Will it just be pages and structure groups, or should I ...
paceaux's user avatar
  • 2,645
5 votes
2 answers
301 views

Remove Item From Package By Name

Ran into the issue where I have clientName in the package which gets merged into the content. Later programName gets added to the package which happens to have the same value as clientName. There is a ...
Brandon Mahoney's user avatar
5 votes
2 answers
210 views

Find components on CM side

I need to find components on CM side that satisfy the following conditions: From target publication Based on a target schema Tagged with target keyword This should be done using tom.net Currently ...
user3760419's user avatar
  • 1,079
5 votes
3 answers
374 views

Tridion Mock Objects

I like to know if there is a generic mock object or community project that will provide me the ability to unit test my TOM API C# code following a test driven development approach. I'm looking for ...
user1096's user avatar
5 votes
2 answers
168 views

With TOM.NET, how do I programmatically put a page into a particular page workflow process?

I am working in Tridion 2011SP1. The issue I'm trying to address relates to the fact that attaching Workflow Page Process Definitions has to be done via the Structure Group properties and these are ...
J Stuart's user avatar
  • 681
5 votes
2 answers
388 views

site map xml generation - Getting publish status of structure group and page adding performance overhead

We are using Tridion 2011 SP1. While generating site map XML in .NET templating code, we came across an issue. The requirement is to show only those structure group/pages in site map XML that are ...
TempTracer's user avatar
5 votes
1 answer
380 views

Is it possible to read the content of Multimedia component binary file using TOM.NET

I have some Multimedia Components which contain uploaded binary files of multimedia types PDF and MS Word. Is it possible to read the content of the PDF/DOC from the Multimedia Component using the ...
Doors's user avatar
  • 51
5 votes
1 answer
240 views

Retrieving data from APP_DATA table

I am storing some details from my tridion pages in the APP_DATA table by passing it on to the DATA_CONTENT column as a stream. While retrieving it via a service call method, the values are not getting ...
Keirthana's user avatar
  • 861
5 votes
2 answers
118 views

TcmUri constructor does not take null as argument

We are busy upgrading 2009 to 2011 and found an annoying difference between the TOM.Net API for both versions. If you try to create a TcmUri object with the single-argument constructor, and the value ...
Quirijn's user avatar
  • 6,767
5 votes
1 answer
82 views

Inserting PublishedBy UserName into Component

I have a scenario where i need to know who has initiated a publish for a component/page. Once that user is known, I need to put that user's name into my component and then it has to go for publishing. ...
Sri's user avatar
  • 73
5 votes
1 answer
58 views

Differentiating Original and "Publish in all child" transactions in Events System

Is there any way where I can differentiate Original transactions and the ones which are result of "Publish in all child publications" in Event System using TOM.NET? I need this because I need to work ...
Marko Milic's user avatar
  • 8,863
5 votes
1 answer
109 views

FakePublish? Suggestions for workaround: SetPublishedTo with CoreService

In addition to this old question: SetPublishedTo with CoreService I have another question for the new Tridion 2011 EventSystem I'm updating our EventSystem from the old TOM API to CoreServices... ...
ZonderZout's user avatar
5 votes
1 answer
911 views

Is RenderComponentPresentation() like AddBinary()?

I understand that SDL Tridion will republish items that use an item you're publishing, which we might call "link propagation." We can change this behavior using Custom Resolvers or previously with the ...
Alvin Reyes's user avatar
  • 12.8k
5 votes
1 answer
118 views

PublishEngine.IsPublished() so slow

We recently migrated from Tridion 2011 to SDL WEB 8.5 and suddenly, in one of our environments (staging), an specific page started to take over 2 hours to being published. This page has a tbb c# ...
Carolina's user avatar
  • 467
5 votes
1 answer
97 views

Translation Manager .NET API v2 - Session use in event code causes EventSystem.DeliverEvent exception

So I'm playing around with the TM .NET API v2 within some event code. I'm interested in adjusting the Xml sent from TM for translation so am subscribing to IItemSendEventArgs. EventSystem.Subscribe&...
Neil's user avatar
  • 6,698
4 votes
3 answers
647 views

Publishing non-Tridion Binaries in Package

Is there a way to publish binaries in the package that are not Tridion assets? I have a Page Template that creates JSON files and places them into the package of a rendering page. I would like to ...
Trevor Bartlett's user avatar
4 votes
2 answers
202 views

Implementing Err.Raise -1000 in .NET Templating

I was using below code in VBScript which check the publishing target and if it is not a mobile targets then it raise an error in publishing queue. Dim mobileTargets mobileTargets = "tcm:0-0-0,tcm:0-...
Manoj Singh's user avatar