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

Posts tagged Platform DXP (Page 18)

Three simple patterns for finding a target page

Quite often when you're putting together a website, you find yourself needing to link the current page to some sort of shared page for an action. "Click here to read terms and conditions" is a common example – where all your products need to be able to link to the Ts & Cs page.

A naive implementation might just hard code the path here, but that is inherently fragile. Renaming or moving the page can easily break your code. So what better approaches might you consider for meeting your requirement while allowing editors flexibility? Having talked about these patterns with colleagues a few times recently, I thought I'd write down some of the basics as a reference for future conversations.

Sorting for search, when you're living in the dark ages

I've written before about filtering data in Lucene searches if you're still using Sitecore 6.x. Having been doing more legacy work on this front over the last couple of weeks, I've got a couple of new things to add. Previously, the search work I'd been doing had relied on the default "relevance" sort order, or LINQ OrderBy clauses. However recently I've needed to enable some more complicated sorting, which has lead me to a few new (to me, at least) discoveries.

Publishing restrictions and search

I had to deal with a bug report in some Sitecore 6.6 / Advanced Database Crawler search code recently, relating to items with publishing restrictions not disappearing from search results until another publish occurred. It struck me that there's not much written about how publishing restrictions interact with search, so I figured I should take a bit of time to write down what I'd found while sorting the bug.

Visual Studio hangs on Sitecore solution load?

It is quite possible that this issue is entirely down to some odd aspect of the setup of the Virtual Machine I'm developing on at the moment, but recently I've experienced quite a few hangs when loading Sitecore solutions. Starting up Visual Studio to be greeted with a never ending progress bar:

Merging package definitons

Continuing on from previous discussions about packages and their definitions, I found myself needing to quickly merge together the definitions of two different packages recently. And that sounded like an opportunity for a simple tool to add to my collection.

A gotcha with custom applications

NB: This post was written about Sitecore V6.6 – if you're using Sitecore 7.5 you should look at the updated version instead.

Ever gone through the steps to create a new Application in the Sitecore "Start Menu", but had it not appear despite refreshing? I wasted an hour of my afternoon scratching my head over this issue recently, so I thought I would write down what I went through in case anyone else hits the same issue...

A question for the community: Development patterns

A bit of a change of tack this week. Rather than writing about something I've been doing, I'd like to ask for your ideas on something I've been thinking about. This issue is way to complex to compress into a tweet to ask on Twitter, and it seems too opinion based to be asked on Stack Overflow. So I'll ask it here, in the hope that some of you clever people might offer your opinions. Comment below, tweet me, write blog posts in response, send carrier pigeons or whatever. All thoughts appreciated...

So here's what I'm thinking about: How do you set up your projects for development?

A quick “find that item” hack

The other day I was having a conversation with a colleague who was bemoaning the lack of a fast way to paste a Sitecore item path into the UI and have the Content Editor change selection to that item. I suggested using the search box or the Navigate button, but apparently they weren't right. The person wanted to paste a link and have the content tree change without any other clicking about.

So, in the spirit of being a helpful co-worker, I hacked up a quick command extension to solve this problem. It's trivially simple, but I figured someone else might find it useful, or learn something that helps them...

Templates and help, part two

Last week I talked about an approach to displaying template-related help fields in Content Editor. The last week has been a bit manic, so I've not managed to spend much time on extending these ideas, but I have a basic approach to displaying similar data in Page Editor. Quick one today...

Help! What does this template do again?

One of the challenges of building sites with Sitecore can be making sure that your content editors understand the purpose of each template and what data they're supposed to be filling in for each field to build up their site. This can be a challenge for complex sites – the data model required for building a complex and feature packed site can sometimes be difficult to explain to non-technical editors.

Historically I've usually tackled this problem though documentation and training sessions – but it struck me the other day that Sitecore itself should be able to help too.

So I've been experimenting with the basics of a really simple prototype for explaining templates. I'll explain a what I was thinking about for Content Editor this week, and hopefully offer some ideas for adding similar behaviour to Page Editor next week.