Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Page printed from: https://blog.jermdavis.dev/posts/2015-02

Posts from February 2015

Zipping your log files...

Whenever you're making requests to a Sitecore instance, you're generating log data. Sitecore does include a scheduled tasks using the Sitecore.Tasks.CleanupAgent to remove old log entries. However what happens if you don't want to delete old logs? Recently I was talking to a developer who needed to keep them but also save disk space. So I hacked up a quick example of one way you might schedule zipping the logs through Sitecore. (rather than via the Windows scheduler or some other route) I'm reproducing it here in case it's of use to anyone else.

Patterns for navigation controls - Language trees

After looking at the navigation for sites with a single content tree in many language versions last week, this week we'll look at the other simple pattern for language navigation: When you have multiple trees of content with one language each and you need navigation links to let people swap between these content trees. This approach works best for websites where the structure of the content you need in each language differs significantly.

Patterns for navigation controls - Language versions

I was going to stop at three posts on simple patterns for navigation (Parts one,two and three are here) – but earlier this week I realised I'd not covered an important topic in navigation for Sitecore-based websites: How you can navigate between different language versions of your sites and pages. So this week, I'll start looking at language navigation.

There are two common patterns for how you might structure your content in Sitecore if you have a multi-lingual site. Depending on what sort of content you're dealing with, you might choose to:

(Technically, there's also a third option, where you have multiple content trees which may also have multiple languages – but that's just a combination of the two ideas I'll present)

The core navigation controls for these sites work in exactly the same way as the ideas I've presented in previous posts. But if you have multiple languages, then you need some code to display links to let the users swap between languages. And you need slightly different code for these two scenarios. So this week I'll look at the first of these: