You just need to Load component with proper LoadFlags, like this:
Component component = (Component)engine.GetObject(package.GetByName(Package.ComponentName));
output = package.CreateXmlDocumentItem(
It will look like this:
The problem is VBscript templates in your migrated 2011 publication. This can easily be fixed by installing the Legacy Pack.
You can install the legacy back by running the Tridion 2013 CM installer with an additional option. This allow you to install the legacy pack. For more info see the Decide if you want to install legacy features section of the manual (...
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 ...
Ensure that item.EmbeddedSchemaName.EmbeddedSchemaFieldName is non-null for each item:
@foreach(dynamic item in List)
if (item.EmbeddedSchemaName.EmbeddedSchemaFieldName != null)
It may be worth doing the same check for item.EmbeddedSchemaName.
From the Razor Mediator ...
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 ...
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 ...
I used both Key/Value pair schemas and "Label" schemas (see here for a good example), and decided that using label schemas ends up being a better approach for the following reasons:
No problems with localized label components
No need to train people maintaining the site that the Key part of a Key/Value pair cannot be changed
Easy to add new keys (just add ...
I'm assuming you're attempting to obtain the URL within your Template Building Block.
If you've got a Page object, you can simply call the following Page.PublishLocationUrl to give you something like /mydirectory/mypage.html.
The domain isn't stored, you're probably best using server side code to output the host name, if you're using static pages you can ...
There's currently not a built in helper method with the Razor Mediator that does this, but there's still different things you can do. First you'll have to understand that Tridion doesn't just "resolve" paths on its own. Behind the scenes with Razor and DW Mediators, tags marked like <img src="tcm:x-xxx" /> automatically have the binary pushed to the ...
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.
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 ...
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)
if (target == null)
ApplicationData appData = target....
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:
The problem is indeed "an error in the if". You have used the XPath 'contains' function, which returns a boolean, and then compared it with a string (either 'true' or 'false'). In the case of comparing a boolean to a string, the string is converted to a boolean.
The rules for this conversion are that a non-empty string is true, and an empty string is false,...
The Cleanup Template default TBB is responsible for removing certain <TCDL> tags, but its behaviour does indeed depend on whether you are in preview mode or not and also what target language is specified for the Publication Target.
If the target language is "None", then the TBB cleans up both <TCDL:ComponentField> and <TCDL:...
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.)
Generating a big XML on publish time is the easiest option but can be a time consuming action, specially as you will need to trigger republish on every page publish/unpublish. I have seen some sitemap publish taking minutes.
There are many options, but my favorite approach consists on 2 steps:
publishing small XML fragments with every page publish/...
What we implement most of the times (for .NET front-end apps):
a table on the front-end DB to store the sitemap information
create a custom deployer to store sitemap information at publishing time
create a custom .NET sitemap provider using this custom table.
This way has (imo) following advantages:
sitemap is always up to date (each publish/unpublish ...
If you absolutely must update a metadata field (or a regular field) of the component when publishing, you can subscribe to the pre-publish events on the component and add logic to make the update BEFORE the publishing actually starts. This does mean your logic for updating the field needs to move out of the component template and into the event system code.
What I usually do, is have a labels component with Key/Value pairs (eg. key: "label.seemore" => value: "See more" ) published as a single XML file to the front end for each language / locale publication.
All the front end needs to do then is to read that XML file from the file system and get the appropriate label for each part in a web page.
This would ...
This should not be a problem.
DD4T is itself a small set of Compound Templates, publishing XML to the Broker DB. Then on the Delivery side, there is a custom library in your MVC application to retrieve content.
Depending on your requirements you can use them together or branch at the design layer.
Alternatively to using the Dreamweaver Get Extension, you could retrieve this information with the use of a C# TBB. Something along the lines of the following should work (assuming this is a page template):
Item p = package.GetByType(ContentType.Page) as Page;
if (p != null)
Page page = engine.GetObject(p.GetValue("ID")) as Page;
if (page != null)...
Values from Linked Components are not available to DWT by default. You can easily push the linked Component into the package using a C# TBB before your DWT is invoked, create a DWT extension function to access those values or use the Dreamweaver Get Extension from SDL Tridion World.
As an alternative you should consider whether you should be rendering a ...
You won't need any .NET for foundation, content modelling or modular ...
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 ...
I never noticed it with Templates. I definitely see this all the time with Schema changes, and the reason is the aggressive Caching strategy of the CME.
Pressing F5 while I have a component loaded will normally fix it for me. Maybe you could try doing the same -
Open a page
check the list of templates (template not there)
check the list of ...
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/...
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: