Experience Sitecore ! | All posts tagged 'Extensions'

Experience Sitecore !

More than 200 articles about the best DXP by Martin Miles

XM Cloud productivity tip: Use Cloud Portal Auto Login extension for Chrome

It may be that you're as annoyed as I am by the way certain things are implemented. Imagine you spin up local XM Cloud in containers, type Up.ps1, hit enter, and go away to make some coffee. It typically takes some time while Docker gets updated images and performs the rest of its business, but right in the middle, it gets interrupted by this:

The only purpose of this screen is for you to confirm, simply clicking the "CONFIRM" button, and then keep waiting for approximately the same amount of time you already spent. It won't progress until you actually press this button.

That isn't nice, what a time waster, I thought, and started thinking about the ways of automating clicking the confirmation button, so that the entire Docker start process goes uninterrupted. Created a Chrome extension that appeared to be the easiest one, so there I went.

Then I thought it would be a good idea also to automate submissions to the other screens when you process to the portal, namely this one:

The question comes next question is how to safely keep the email identifier separately from the extension. Browser local storage seems to be a good compromise, so let's go that way. Once users come to the portal for the first time, they enter their email ID as normal. At the time of submission, the extension intercepts the button click and stores the value encrypted. On the next visit to this screen, the value is decrypted and gets automatically submitted into the field by the extension.

I use basic base64 encryption, but with an additional step of character rotation (also known as the Caesar Cipher). This prevents a stranger from a straightforward decipherment of the value taken directly from the local storage. Email ID isn't a very sensitive piece of information, so I am not going wild with protecting its value.

Finally, when the user deliberately logs out by using a drop-down menu from the top right corner, the extension removes the value from the browser's storage. This is done purposely, for example, if one logs out, they usually do that in order to log in as the other user, or maybe they just want out of the system - in any case, we must ensure no further automatic logins persist, and that is exactly what happens.

Currently, it is under moderation in the Chrome store, so you may load this archive by this link and progress with the "Load unpacked" extension, as shown below:

Source code is available here: https://github.com/MartinMiles/cloud-portal-auto-login

Hope you like that one. If you have any comments or thoughts, reach out to me!


Sitecore RSS Feed revised by using Content Search API instead of unproductive Sitecore Query

I am working on a large multilingual website with several dozens of thousands pages are available in numerous languages. It also features news being released on a daily basis by tens of news editors under plenty of nested categories. Thus it was matter of time for me to be asked to implement an adequate RSS Feed solution to expose all the possible data.

Luckily, Sitecore has built-in RSS Feed feature, but unfortunately it has very limited implementation by data driven using Sitecore Queries, obviously this is quite a legacy feature was added into Sitecore way before version 7.0 with its revolutionary Content Search API. 

What is wrong with this old-fashioned Sitecore Query:

  • it is limited in its applicable functionality
  • has complicated synthax
  • isn't easy to debug and troubleshoot, especially on complex conditions
  • is slooooooow (even fast query is slow!)
  • talks to database and generates cache for touched items
That was absolutely obvious that I should use Content Search API. I googled around and came across some implementation done by Douglas Couto for Sitecore 7 and Lucene. I reworked it to be compatible for versions 9.*+ and added few new features.

It is available at my GitHub repository (and readMe file is quite explanatory there)
Once you get the items from either TDS serialization or Sitecore package, a new Content search section is added to RSS Feed template to drive the data out of Content Search API rather than Sitecore Query:


All the benefits of Content Search API are available to you from now on. Using this new section one may fine tune the data to be exposed by not just certain page templates, but also filter to be located under specific node, has certain tags and specify recency criteria for that filtered data.

Hope this helps!

Sitecore extensions for Google Chrome review

  1. Sitecore Developer Tool
  2. Sitecore Analytics Testing Tools
  3. Sitecore Expand Collapse Sections
  4. Sitecore Keyboard Shortcuts
  5. Sitecore Helper
  6. Dan's Sitecore Shortcuts

1. Sitecore Developer Tool

This is a nice, elegant and non-obtrusive shortcut extension located at the top right of your Chrome browser. It has several most useful shortcuts logically grouped by tabs.


Admin Pages tab contains useful admin pages hotlinks.


Database tab allows to quickly change context database.


Mode tab has 6 switchers - the names are self-describing.


There is also options tab, where you can add / edit favourites, add more databases and perform other settings for the extension.

You may install Sitecore Developer Tool by this link.



2. Sitecore Analytics testing tools

As it comes clear from its name, this is an extension to fit specific analytics purrposes, which are: clearning analytics-related cookies and specifying a forwarded IP address for GeoIP lookups.


Below there are screenshots of its settings screen:





Download and install exension: the link.



3. Sitecore Expand Collapse Sections

Minimal extension that serves just one purpose - expand and collapse data section panels in Sitecore.


What can be easier?


Unfortunately, at the moment this extension does not support Sitecore 8, so the last funcional verison is 7.5

You may install Sitecore Expand Collapse Sections by this link.



4. Sitecore Keyboard Shortcuts

It presents


It is a powerfull extension that allows you to create hot keys to quickly complete common tasks in Sitecore. This is especially useful for demos or for quick access to frequently used items. No need to repeatedly expand the content tree any longer.

it works well for Sitecore 8 as well as with all previous versions I have tested with. It also works well on Mac computers, however mac-specific keyboard extensions (ie. Cmd) are not supported. screenshot below shows settings screen:


And here is a dropdown containing list of possible actions. Quite impressive!


Download and install exension: the link.



5. Sitecore Helper

This extension brings upgrades the Sitecore interface with toggleable usability fixes.Applies several fixes & updates to the Sitecore user interface, use the options menu to toggle them on / off.


Download and install exension: the link.




6. Dan's Sitecore shortcuts

Extension provides a drop down with features and shotcut buttons.


Download and install: the link.


Hope these extensions may help you to improve your productivity while working on Stecore projects!

Sitecore tips

1. Load Sitecore Desktop automatically and pre-select an item

I was wondering, if there is any opportunity to preload Sitecore Desktop automatically on Sitecore enter.

So annoyed of moving mouse across whole big monitor to the very top bottom, then select Content Editor from the menu, then wait till it loads an eventually as content tree loads - navigate to specific item! Even if it does not seem quite complex for a first glance - the number of times I do that per day makes me sadly thinking of wasted efforts for nothing...

Good news, everyone! There a convenient way of creating a shortcut that not only loads Content Editor, but also select any item you would like and loads its data right hand side. Here is the format of url:

http://your.host.name/sitecore/shell/Applications/Content%20Editor.aspx?fo={9CFF486B-9829-416E-8A39-408D3909B4FE}

where fo parameter stands for the item you want to pre-load.


2. If you use Google Chrome - install Chrome extensions for Sitecore


More details in my blog post by this link: Sitecore extensions for Google Chrome