Skip to main content

Posts

Showing posts with the label Publishing

Enable XPM Session Preview in Web 8 using Microservices

If you implemented the steps in the previous post Implementing Experience Manager in DD4T 2.0 .NET , then at this moment you can run your web application and XPM markup will appear in your HTML output. Also XPM functionality is working. However, if there are modifications on the Page or any Components on the Page that are not published, the "Update Preview" button will flash in the XPM GUI. Pressing this button will eventually end up in an error and the Update Preview button will keep flashing. This is due to the fact that we have not configured Session Preview yet. The following sections will guide you through installing and configuring Session Preview and database and services it uses. Experience Manager Database This database, aka Session Preview Database , has the same structure as a Tridion Content Data Store database, only that it is used as temporary storage for items that have been modified in XPM and previewed (i.e. rendered with templates), but not yet publi...

Implementing Experience Manager in DD4T 2 .NET

This post describes an implementation of Experience Manager (XPM) for DD4T 2 .NET using the CIL (REST) providers in SDL Web 8. The implementation would be basically the same in a more standard architecture where the Tridion Content Delivery stack would be used. XPM Configuration Switch In you web application's web.config , add the following line inside the configuration / appSettings node: <add key= "DD4T.IsPreview" value= "true" /> Only if this switch is present and set to true, the XPM markup will be generated in your HTML sources. Models Ready for XPM In order for XPM utility methods provided by DD4T out of the box to work, the models must: implement interface  DD4T.Core.Contracts.ViewModels.IViewModel ; annotate their Tridion fields with attributes; The code below shows a simple model that is XPM ready: using DD4T.ContentModel ; using DD4T.Core.Contracts.ViewModels ; using DD4T.Mvc.ViewModels.Attributes ; using DD4T....

Yet Another Event System - Revisited

As a followup of my previous post Yet Another Event System? , it is time for a follow up on the code and examples. The code has been added to Google Code and it's available for free at  YAES source code . You can simply download the entire solution and start coding. If you're only interested in the main functionality class, go directly to ConfigurationManager.cs . Installation This is a normal Event System installation process: Copy the compiled Event System DLL to a location of your choosing Reference the DLL from file [Tridion_Home] \conf\Tridion.ContentManager.config , in section configuration / extensions / add , attribute assemblyFileName Copy a .config file to the same directory where your Event System DLL is located, and name it the same as your DLL, but with extension .config Restart Tridion processes. For knowing exactly which process to restart, have a look at my earlier post  Debugging a Tridion 2011 Event System Configuration The .config file al...

Purge Publish Transaction Script

Ok, it's time to do some maintenance and performance tuning on your Tridion CMS. One of the things you should keep an eye is the size of the Publishing Queue. This can grow quite large over time depending on the amount of publishing going on daily. Tridion comes with a very handy tool -- the Purge Tool, which allows trimming the size of the Publishing Queue. I won't go into what the tool can do; there is documentation for that. The following little script is perfect to run inside a Windows batch script and schedule it to execute periodically. In its current state it deletes Publish Transactions that completed more than 1 year ago relative to today's date. @echo off set /a LastYear=%DATE:~10,4%-1 set OneYearAgo=%LastYear%/%date:~4,5% echo OneYearAgo=%OneYearAgo% echo TRIDION_HOME=%TRIDION_HOME% @echo off > "%TRIDION_HOME%bin\purge.xml" & setLocal enableDELAYedexpansion for /f "tokens=* delims= " %%a in (purgeTemplate.xml) do (...