12

I agree that ordinal position can be very useful, so I added this to the XSLT Mediator a long time ago, I also added something called regional position which gets the position within a group. To achieve this, I set a Context Variable just before calling the ComponentPresentation.Render() code using the Page Template called ORDINAL_POSITION as follows: if (...


10

I had the same problem when calling Set var = CreateObject("DLL.Class"). This was happening from Workflow Visio VB Script. I created a simple VB script do the same and object was created without any problem. After bumping my head against a very hard desk a few times, it dawned on me if I was using the correct version of RegAsm utility to register my DLL. ...


9

I recently solved a bug with a similar cause. The regional settings can be accessed via the Control Panel. The regional settings have default values for the whole server, and also per account. You should ensure that the combination of these settings ends up with the correct result for the MTSUser account (the identity under which the SDL Tridion Content ...


7

Sounds functionally similar to a requirement for unique identifiers for analytics. I previously wrote a post that summarizes some of the points in the other answers: http://www.createandbreak.net/2013/01/sdl-tridion-and-web-analytics-aka-how.html (with drawings :-) ) To get unique identifiers for component presentations within a given page, you will need: ...


7

Thanks for the responses, all. In light of Bart's answer, I have decided that I can make do with having the ordinal position of each Component Presentation, with respect to its Component Template. That is, rather than identify that Component Presentation x is the nth Component Presentation on the page, I identify that Component Presentation x is the nth ...


7

The Dreamweaver Component Template you are referring to is actually a Dreamweaver Template Building Block, which is part of a Component Template. Now in the Dreamweaver TBB, you have direct access to package variables, but the Page is not part of that for a Component Presentation. The reason behind this must be because a Component Presentation can also be ...


6

Err.Raise is the VBScript equivalent to 'throw new Exception'. In a .Net C# Template (or Razor template) you would do something like: throw new Exception("This page should be published only to mobile site");


6

It looks like you are not iterating through each Component Presentation on the page in order, so TemplateRepeatIndex would not work for you. One option might be to write a Dreamweaver custom function? This could generate a unique id for you based on the Component and Component Template item ids?


6

As a couple of the answers have hinted, this is a page template responsibility rather than a component template one. That's all very well; it's possible to have the page render have variables which the component render can increment (for example, see this recipe on Tridion practice), but frankly it's pretty involved and probably not worth the trouble. If ...


6

My suspicion would fall on permissions. Check the logs for DCOM failures. Tridion doesn't have any magical influence over how CreateObject works. If you can CreateObject("DLL.Class") succesfully from other VBScript code running on the same server, then there's no reason why it can't work just as well from within Tridion. I'd start by executing your test ...


6

Sounds like this may be a server policy setting. Here is a link explaining how to change update it: http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/da4633e8-2df5-4095-9d7f-0d636bebcb58


5

The output of the templates is slightly different from the old ones. I suggest you check how the default templates are actually being used on your websites (they are quite ugly, so I would be surprised if they were actually used on your live sites). Perhaps the one to be most concerned about is the Default TBB which had functions that could be used by other ...


4

Every workflow activity must end with the instruction of which is the next activity. IIRC, you can specify Nothing or "" as the next activity if you only have one option. EDIT I just RTFM'ed: Public Function FinishActivity(ByVal finishMessage As String, Optional ByVal nextActivity As String = TDSDefines.URINULL, ...


4

In VbScript Err.Raise is used to "raise an error". The equivalent action in .NET is to throw an exception. While these two approaches fulfil more or less the same function, the mechanism for identifying the error/exception is different. In your VbScript example you have used the error number -1000. This can be detected in code higher up the stack with ...


4

In either the 2009 or 2011 releases the rendering process when publishing pages containing DCPs was "optimized" so that the DCPs were rendered separately outside the context of the page rendering. This meant that if you published a whole bunch of pages in one go, and several contained the same DCP, this DCP would only be rendered once, whereas previously it ...


4

We had selected to enforce Bundle Workflow Processes at a schema level. As such, the GUI selects a default Workflow Process for the Bundle which we didn't change and just saved. After changing the Preferred Workflow Process for this Bundle to a workflow we designed without legacy scripts etc. all was well.


3

Workflow script types are registered in Tridion.ContentManager.config. You could temporarily add an entry for VBScript (using a bogus executor type) so that the VBScript activities can be loaded and deleted.


3

In the old COM API's TCMScriptAssistant class, which has it's methods exposed to VBScript templates, there is an AddBinary method which I think you are looking for... Documentation is as follows: AddBinary Summary Writes binary data from a Multimedia Component to a temporary directory so that the publisher can retrieve the file and publish it to the ...


3

I think this could just be an error in your legacy Component Template. According to the stack trace, the error has surfaced from inside RenderComponentPresentation, not from the code in your Page Template. Googling the error message gives me lots of results regarding VB, VBA etc. and nothing related to .Net, which further points to the legacy template ...


3

You can try using combination of C# and CoreService to remove the associated component process from the schema. The following code should help you get started: static void Main(string[] args) { SessionAwareCoreServiceClient client = new SessionAwareCoreServiceClient("netTcp_2013"); var schema = client.Read("tcm:64-159-8", new ...


3

Click on “border view” to see if the borders appear. It could be that the elements have a higher Z index than the borders and floating over it or somehow the border is not wrapping correctly. Check to see if a faint grey border appears anywhere on the screen. That would mean its a shared item and you can not edit it without either localizing or clicking ...


3

In the Tridion Content Manager configuration MMC console, open the 'Management server settings' and 'Script Extensions'. Add your DLL to the script extension and it should be available in your templates. I assume this setting is there in your old implementation.


2

In VbScript, if you wish to pass parameters to a function or sub, the simplest syntax is to just put the parameters in a comma separated list after the function name. Using your example: oActivity.FinishActivity "Creation point" If you are more comfortable with parentheses, the Call keyword allows for the alternative syntax: Call oActivity....


2

There's a number of ways this can be achieved: Write a Dreamweaver function source that you call from your DWT that tracks this. You can initialize the source when the page starts rendering (Initialize is always called) and then keep track of it. This extension almost gets there... might be a good start. Write the variable from the Page template instead. ...


2

I'm not 100% sure why it works in preview for you (I expect you are previewing the Page, not just the Component, but there's still something a little funky going on there), but remember that Dynamic Component Templates are rendered separately from the Page (think as if they are HTML/Code snippets, not full pages) and deployed separately to the Broker ...


2

Have you checked that it works when called from a VbScript Page Template? If it's really about the difference between a VbScript page template and a .NET one, you should look to see if the VbScript code in the component template directly addresses items that belong to the Page/PT. This was quite easy to do in VbScript and was quite a common technique. ...


2

In VbScript, the Now() function will get you the current Date/Time. There are various other functions you can use to format or manipulate it. You can easily Google to find out about these. You could use this to output the publish date in the XML. In the page template that renders offers.asp you could output ASP code that reads the XML and extracts the date....


1

This is a (well ?) known limitation of workflow which can be circumvented in Tridion 2013 using Bundles. As you are on 2011 I can only advise either upgrading to 2013 and using bundle workflow or dropping the requirement altogether as a solution to "fix" this issue would be way too complex and expensive and quite possibly introduce more issues than it ...


1

You can recursively call objSG.OrganizationalItem, till it no longer returns a Structure Group, but a Publication (then you know you have reached the top). You will have to build the path via this (expensive) method yourself, so you might want to consider rewriting the entire function in a TBB using the TOM.NET API. You still have to do the same process, ...


1

While mixing Template languages is supported and working, it doesn't mean they complement eachother completely. When mixing the two, first of all you should definitely see it as a temporary solution while in migration to the newer model. You should also consider handling things like Component Link object declaration a bit smarter, so not making it available ...


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