Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Page printed from: https://blog.jermdavis.dev/tags/platform-dxp/17

Posts tagged Platform DXP (Page 17)

Notes on an annoying misconfiguration

I spent a while banging my head against an issue on a client's site last week. Having finally worked out the subtle misconfiguration of that was causing the bug, I thought I should write it down in case anyone else ever suffers the same problem. I figure if I write this down in enough detail, maybe the next person who suffers a related problem won't have to spend as much time Googling as I did...

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:

Patterns for navigation controls - Varied styles

Continuing the theme of simple approaches to navigation components, this week I want to look at a slightly more complex scenario for the top level navigation in a site. Sometimes you need the mark-up for primary navigation to vary between different items in your navigation. Perhaps you have some pages which need a different style of display because of their purpose on the site. And generally in this sort of scenario you need editors to have some control over which items get these different views.

Gotchas with custom apps, version 2

A quick distraction from navigation patterns this week:

A while back I wrote a bit about issues with following the SDN instructions to create a new custom application on your Sitecore "start menu". Recently I responded to a Stack Overflow question about this issue, where after a bit of discussion I discovered that this didn't work quite the same way on Sitecore 7.5. So having investigated why, I figured I should write this up...

Patterns for navigation controls - Breadcrumbs

Last week I started looking at some simple ideas for the top level navigation for Sitecore websites. This week, I'll continue that theme with some simple examples of the more localised navigation that you might use on content pages.

Patterns for navigation controls - Basics

Most websites need some sort of navigation UI. If you have a site with more than a handful of pages then you're likely to need to create some components for rendering sets of links that show the structure of your site. So continuing my theme of simple patterns for Sitecore code, here is the first of a few posts on some approaches to navigation.

Another nice feature in C#6.0

Ok, so it's technically Christmas and I should really be eating too many mince pies and watching repeats of early 80s sitcoms instead of blogging. But somehow I can't stop technology catching my eye.

Do your UI controls need to change style depending on where they're used?

It's not an uncommon requirement to have a control on your website which displays its data with varying styles in different locations in the site. Here are a few simple patterns for how you can create Sitecore UI components which can have their display style changed by location.