Show Fieldname in Experience Editor Placeholder Text

A few weeks ago on Sitecore Slack chat, fellow MVP Neil Shack discovered a tucked away setting in the renderField pipeline. Enabling this causes the field name to be rendered in the default placeholder text in Experience Editor mode:

Read More

Advertisements

Glass Edit Frame – Immediately Invoking Wrapper

tl;dr; Custom HTML Helper to wrap Glass Edit Frame and JS code to immediately open the modal dialog for editing

As I’m sure most of you are aware, I ๐Ÿ˜ Glass Mapper. So much so that I struggle with the native Sitecore API ๐Ÿ˜‚ย 

Version 4 of the framework added an amazing feature which allows you to very simply and quickly create/bind to Edit Frames purely from code. Normally this is a bit of an annoying and long winded processing: switch over to the core database, create an item with names of the fields, serialize/sync to source control, do this for every combination of fields you have, hook it up to EditFrame code that until recently did not work in native Sitecore MVC ๐Ÿ˜†

I’m sure you’ve been using this feature, it’s super simple from code to add an EditFrame wherever you need and the best part is it’s bound against your strongly typed model:

@using (BeginEditFrame(Model.Page, "Edit Metadata", x => x.DisplayInMenu, x => x.Closed))
{
  <div>Let's add an Edit Frame around our rendering</div>
}

If you need to add another field then simply add it to the list of fields and Glass handles everything for you.

Read More

Highlight Sitecore Components with Rendering Chrome

a.k.a “Rendering Wrappers”

tl;dr; MVC HTML Helper and custom CSS styling to add chrome highlighting around renderings in Experience Editor mode.

I presented this module at the Sitecore User Group London on 12th January 2017. You can download the slides for that lightning talk here.

A few months ago I presented Session 4 of the Unofficial Sitecore Training sessions that Akshay “Be My Friend” Sura and Mike “Blog All The Things” Reynolds have been hosting. If you’re new to Sitecore or need a refresher course then I suggest you head on over and watch the videos on the series, there’s some really useful info in there from some seasoned Sitecore developers and gurus.

Anyhow, I decided presenting stuff and virtually pointing things out is hard so I added a fairly early version of some code that we had been using and experimenting with on our current project. This would make it easier to see components in Experience Editor mode and therefore easier for the audience to follow along with what I was doing. Some people noticed this at least ๐Ÿ™‚

Read More

Environment Styler for Sitecore

tl;dr; Install the module, set the config value to match your environment, have a stylised login screen and header bar per environment.

Have you ever sat there working on some task and then suddenly someone asks you to take a look at an issue on the Production environment? So you log onto that server, resolve the issue, get distracted for a few minutes by cat videos and then get back to what you were doing. But you suddenly realise that those changes you were just making was not on your local environment, you still had the Production site open in your browser tab! Oh noes!

Oh noes!

The problem is that all the environments all looks exactly the same… the only difference being that teeny tiny URL bar, the URL in which probably also looks very similar apart from some environment prefix.

Read More