17

Found it! @@Template.Title@@ Thanks for listening :)


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 ...


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

I would upload your mobile specific Assembly and TBBs to a separate folder. You then have 2 options: Localize your CT/PT to put the local mobile TBB instead of the desktop version Localize your TBB, open it and go to the source tab, edit the C# fragment to point the TBB at the mobile assembly Uri and class name.


13

Indeed, only on CTs with XML Document output, this Dynamic Template tab shows up. The template developer can put an XSLT document in here and it will be used to transform the generated XML Document output (of this Component Presentation) on the Content Delivery side. The Component Presentation Assembler, when asked to generate the CP for a Component with ...


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....


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

I think it probably depends on what goals you're wanting to achieve. I managed fine with just front-end stuff (HTML, CSS, Javascript plus some PHP) any .NET knowledge 18 months ago, but I reckon you need to have a coding mindset - others I know did struggle with .NET templating. You won't need any .NET for foundation, content modelling or modular ...


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

You won't be able to get the embedded schema directly with the Razor Mediator, but since its just a wrapper of the TOM.NET API, you can create your own function that returns the schema's title. The following example allows you to pass it a ComponentModel instance and a name of the field that you want to get the embedded schema's title for: @using Tridion....


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 ...


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 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 ...


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

In a Java-based app that takes advantage of Dynamic Component Linking you can do this: <%@ page import="com.tridion.linking.ComponentLink, com.tridion.linking.Link" %> <% string componentUri = "@@Component.ID@@"; ComponentLink componentLink = new ComponentLink("@@PublicationUri@@"); String formActionUrl = componentLink.getLink(...


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

You should switch the TBB's around. The first DD4T template WILL generate the XML, no matter which one it is (otherwise it'll have a hard time finding the binaries). The generate dynamic component (or page for that matter) do nothing if there if they are not the first. I suspect though that you might end up in a situation where you may get binaries for all ...


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 ...


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