15

A couple of steps are necessary in order to get Tridion to use a CSS preprocessor, but it certainly can be done: Install Sass on the Tridion server. Since Tridion runs on windows machines, you should install first Ruby, and then Sass. You need to be able to build Sass things from the command line. Make sure that .scss is a valid mimetype. Within the ...


14

In a Component Template TBB, you don't have (direct) access to the Page object. The property ContextItem would return the Component that is being rendered with the current Component Tempalte. Please check that, as I'm not familiar with what TridionHelper should do. Hence your code ContextItem as Page will return null. Back to your question -- how to pass ...


13

Credit on this solution goes to Eric Huiza. Here's an Extension Method for the Publication Target that reads the Application Data to check if the target is SiteEditEnabled: public static bool IsSiteEditEnabled(this PublicationTarget target) { try { if (target == null) return true; ApplicationData appData = target....


10

I'm not sure there is a correct answer here... i think it's based on the client needs. Here's an opinion... It's now possible to store binaries in the broker database, it makes a great case for managing them in the CMS, so that external 'consumers' (development teams, partner websites, load balanced machines, etc) can consume / store these files and ...


9

The problem might be that you are not setting TemplateType property. Check what is your TemplateType, or set it to DreamweaverTemplate


9

I developed Visual Studio 2010 Extension (might be working in 2012) for synchronization Visual Studio *.cshtml files with Tridion TBBs via CoreService http://code.google.com/p/visual-studio-extension-4-tridion-razor-mediator/ The main idea how to make razor mediator files editable is next: Add next web.config to 'fake' ASP.NET MVC application <?xml ...


9

The CD side does not know anything about ECL items at all. So you have to deal with them in your templating code in CM. This means if any metadata (either type) has to be published you need to do this from your template. You also have to resolve the ECL URI into either something binary downloaded from the external system and included in the package (this ...


9

In addition to Nick's technical answer, I want to add the philosophical angle -- Why would you want to modify a field during template execution? While technically this is possible, it makes no sense to do so while the template is executing. I understand you want to change a field value, then save the Component to propagate your change to the CM database. ...


9

According to this helpful post by Dominic Cronin You can use "text" tags in order to do this. So the final if statement looks like this: @if (Fields.releaseMediaTitle == null) { <text> <div class="col-sm-12"> <a href="http://www.example.org"> </text> } else { <text> <div class="col-sm-8"> &...


8

If you are using Razor Mediator to build your layout you can use its built-in function IsSiteEditEnabled. The Razor Mediator v1.3.3 documentation has the following example. @if (IsSiteEditEnabled) { <div>Component Title: @Component.Title</div> }


8

I agree with John that it would be based on the clients needs, but also in relation to what development and deployment model you have chosen. When looking at the different implementation options, I like the simplicity of having HTML in your (DWT) Templates and then often will go for Publishing CSS and JS as Pages (personally hate the idea of using ...


8

Here is the logic that I use with clients (and chiming in with what Alvin said): C# is code, therefore belongs in a code repository (e.g. SVN). Java is code, therefore belongs is a code repository. SQL scripts is code, therefore belongs is a code repository. .... should I go on? So what makes JavaScript or CSS any different? It is code that also needs to ...


8

You have three options to retrieve any values from the package, which would include parameter schemas: @Package.ItemName @Package.GetByName("ItemName").GetAsString() @Package.GetValue("ItemName")


7

Yes, it's still the case in 2013. You need to set allowWriteOperationsInTemplates attribute to true, to the element called tridion.contentmanager.security in Tridion.ContentManager.config


7

Not sure I understand your question completely, but depending on the purpose you can: Configure Event System to fail UnpublishTransaction when you send something to be unpublished Configure Event System to fail when setting item published state (basically during marking item as unpublished) Configure custom resolver to fail when resolving at the very early ...


7

In the Templating Base project on SDL Tridion World there is a method GetPage() this is something which usually is called on a Page Template only, but can also be used to get to the Page object on a Component Template (provided it exists, which is only the case for embedded Component Presentations when they are published, or the Page they are on is previewed)...


7

The code inside the <!-- TemplateBeginRepeat --> has context... Just test your value as such. Also, you need an "is equal to" operator, rather than an "equals" I think ;) The following works for me... <!-- TemplateBeginRepeat name="OffersText" --> <!-- TemplateBeginIf cond="Select == 'Offer A'" --> <div class="col-sm-3 ...


7

I don't think it's possible without a custom TBB. For short, the idea is to map Structure Groups to the Folders containing your Multimedia Components, then use these SGs when publishing a given MM Component. The creation of the mapped Structure Groups is something that could be done via event system, when saving a MM Component. The publishing part would ...


7

There's an infinite number of ways to achieve this. What is best depends entirely on your scenario; however, if you are looking simply to inject a snippet of Javascript into a manually-selected set of pages, the easiest and most flexible way I can think to achieve this would be along the lines of the following: Create a 'Plain Text' or 'Code' Schema, which ...


7

The simplest way to add JS to your header in your Tridion implementation is to keep JS out of the Tridion CM and deal with it purely on the presentation side. To do this, simply render the path to the file on your presentation server. This means keeping your JS bundled along with other presentation side code. See this Q&A for further insight on the ...


7

Dreamweaver templating is not really intended to support generic programming constructs beyond simple loops and conditionals. Yes - you can manage to get it to do more than that, especially if you are prepared to create and install a function source assembly. There are enough people who will be happy to share tricks to make Dreamweaver templating do your ...


7

I will assume you are using Tridion 2013. Then you have 3 choices of Template Mediators in your architecture: DWT Razor Mediaor XSLT I prefer the Razor Mediator myself, since it has the best balance of features and ease of use. I have written a VBScript -> Razor wiki here The Razor Mediator also has great documentation and is used very often as a ...


7

A way to pass variables across template scopes of the same rendering session is via Context Variables hash map. See Tridion docs for usage. A mix of concerns is a caveat to consider here. So this kind of approach, my opinion, is tough on maintenance and not ideal. Note, using this approach you will not be able to debug your CTs in Template Builder because ...


7

There are normally three places that I would check for character display issues such as this: Do the characters look correct inside of the Components in the Tridion Content Management Explorer (CME)? Can you open the published page (assuming that this is not a Dynamic Component Presentation) in Notepad++ or similar on the web server? Do the characters look ...


7

The Publisher for sure caches objects, but the lifetime of that cache is normally from the point the the Publish Transaction is picked up from the queue to the point that rendering (of all items in the Publish Transaction) is done. There is a possibility to configure a shorter lifetime (only during rendering of individual items) but this is normally not ...


6

Not sure if this is officially supported, but there are no any problems with using 2013 Template Builder with 2011 CM, there were very few changes in Template Builder


6

You can use Render method on RenderEngine: Tridion.ContentManager.Publishing.Rendering.RenderEngine.Render Here's the signature: public static RenderedItem Render( IdentifiableObject item, Template template, PublishInstruction instruction, ...


6

There are two really simple ways of doing it, that I can quickly come up with: Create a Compound Template Building Block (like the Default Finish Actions) which contains all your "defaults". This would still require some manual work of adding that one of course. (a variant of this would be to add your TBBs to the Default Finish Actions, unless your TBBs ...


6

A possible cause of this kind of issue is a memory leak. Sometimes, instead of out-of-memory errors, COM raises automation errors or interface errors. My suggestion is that you set up some perfmon traces on the private bytes of the relevant processes. If this is the problem, you'll see the memory going up to unsustainable levels just before you start to see ...


6

It retrieves the first item named Component from the top of the stack. Most likely your "Working" Component is the last one pushed onto the stack and therefore that one is retrieved. If you try swapping around the order of the Components, then you'll end up with and error.


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