Friday, March 23, 2012

Retrieving Related Content in the CD side

The example below shows how to retrieve the latest 5 news of type sport, then these are sorted descending. These news are classified using taxonomies.

        protected override void Render(HtmlTextWriter writer)


            string[] sportNews;

            Query query = null;            
            Criteria criteria = new ItemTypeCriteria(16);
            ComponentPresentationFactory _cpf = new ComponentPresentationFactory(PublicationId); 

            CustomMetaKeyCriteria keyCriteria = new CustomMetaKeyCriteria("news");
            CustomMetaValueCriteria valueCriteria = new CustomMetaValueCriteria(keyCriteria, "Sport");

            List<Criteria> queryItems = new List<Criteria>();
            query = new Query(new AndCriteria(queryItems.ToArray()));

            //Set a limit on number of items                        
            query.SetResultFilter(new LimitFilter(5));

            //Add sorting
            SortParameter sort = new SortParameter(SortParameter.ItemLastPublishedDate, SortParameter.Descending);

            sportNews = query.ExecuteQuery();

            foreach (string news in sportNews)
                ComponentPresentation cp = _cpf.GetComponentPresentationWithOutputFormat(news, "XML Fragment");
                if (cp != null)
                    DisplaySportNewsItem(news, cp, writer);

Wednesday, March 14, 2012

NetBiscuits - HelloWorld with a Custom .NET Application

As far as I am aware this will be the first step by step tutorial to get up and running a NetBiscuit app feed from a .NET app. Otherwise I should have known where that tutorial was yesterday! I had some problems getting my first NetBiscuit app to work.

I intend to provide great detail so that absolutely anyone can get it done, I'll show screenshots of every step.

The steps are as follows:

  1. Crete an empty Website using Visual Studio
  2. Download a Sample NetBiscuit app from
  3. Copy the bml and images to your website
  4. Create a Custom Application in NetBiscuit
  5. Test it!

Wednesday, March 7, 2012

UGC - User Generated Content - Part 1

A few months ago I was named UGC SME thus I had to prepare a presentation to be given to my colleagues at SDL WCM as part of a bootcamp. I had just two or three days to prepare it all (myself + UGC working environment + presentation), despite two/three days is a short time to prepare a matter that I hadn't even heard of, it was actually enough.

I got much help from Daniel (Romania) who is part of the Content Delivery team in R&D, without him likely I wouldn't be writing these lines. Daniel, I want to take the opportunity to say thank you for your support and understanding.

Last week in a great 2012 kickoff/bootcamp in Orlando I intended to expand the work I did around UGC together with another two colleagues, Taras (Ukraine) and Fredy (USA). We tried to get to work a SpamFilter with no luck, you might be wondering what a SpamFilter is, be water my friend. Did you realise how international our team is?

In this post I will explain the following:
  • What is UGC
  • What can we do with UGC and where can be found in the CME
  • UGC History in SDL WCM
  • Where you can find documentation
In my next post I will write about the following:
  • UGC Architecture in SDL WCM
  • Installation on Content Manager and Content Delivery
  • Security - WhiteList and SpamFilter
  • Creating a SpamFilter, getting a fully working .NET solution.

Sunday, March 4, 2012

Keeping up to date with the Tridion Community using Netvibes

I had three main motivations to start this blog:

  • Share as much useful information as possible from TechLink.  Failed
  • Organize community posts by category. Failed
  • Contribute to the community my two cents. Succeed

Obviously I failed to achieve the first two goals. I underestimated the fast growing community and overestimated my free time to keep up to date with both tasks.

That said, I found the way to keep up with the community myself. First I used google reader, then Mark (a colleague from UK) told the team about netvibes. Since I found out about netvibes (and spent sometime playing around with it) it is being the main way in which I keep up with the community.

Somethings you should know about netvibes:

  • It is mainly a custom dashboard
  • You can create public and private pages
  • You can add RSS, Twitter, Facebook and all your email accounts
  • I won't give you any more reasons to make you think that I am working as sales at netvibes!

I hope you like it as much as I do.

I still miss a way to perform a cross site search amoghts some preset sites. This is to be able to search throughout the entire community efficiently in one go. If you are thinking of google, I have already heard about it ;o)

If you know of _something_ that can help me to do that I'd appreciate you let me know!