Try our conversational search powered by Generative AI!

Per Nergård
Mar 18, 2016
  2031
(1 votes)

Order content types with drag and drop

A while back I did a custom plugin that allowed admins to reorder tabs using drag and drop. Another thing I always wanted to be able to do easier is to change the sortorder of content types and also set access rights.

It's possible today but it's a bit tedious with serveral clicks to get into the proper dialog and you don't have an clear overview how access rights are setup.

So I did another admin plugin for this. You can sort both page types and block types with drag and drop and you can easily manage access rights. If you don't want to use drag and drop there is two buttons to sort by either full name or type name. Full name is the type name prefixed with the GroupName property on the types ContentType attribute. The tables are sorted by sortindex which is what epi uses as standard both in admin mode and when creating a new content in edit mode.

Depending on your solution and how many types you have you may or may not want to use the GroupName attribute. Normally I don't use it so all page types is grouped below "Other" when creating a new page. 

When you hit save what the plugin does is change the sortorder index value according to the sort order in the plugin. It starts at 100 and uses step of 100. Both Save buttons processes both page and block types. 

See pictures below and you can get the code over at my Gist.

Image page types.jpg

Image block types.jpg

Mar 18, 2016

Comments

Please login to comment.
Latest blogs
From Procrastination to Proficiency: Navigating Your Journey to Web Experimentation Certification

Hey there, Optimizely enthusiasts!   Join me in celebrating a milestone – I'm officially a certified web experimentation expert! It's an exhilarati...

Silvio Pacitto | May 17, 2024

GPT-4o Now Available for Optimizely via the AI-Assistant plugin!

I am excited to announce that GPT-4o is now available for Optimizely users through the Epicweb AI-Assistant integration. This means you can leverag...

Luc Gosso (MVP) | May 17, 2024 | Syndicated blog

The downside of being too fast

Today when I was tracking down some changes, I came across this commit comment Who wrote this? Me, almost 5 years ago. I did have a chuckle in my...

Quan Mai | May 17, 2024 | Syndicated blog

Optimizely Forms: Safeguarding Your Data

With the rise of cyber threats and privacy concerns, safeguarding sensitive information has become a top priority for businesses across all...

K Khan | May 16, 2024

The Experimentation Process

This blog is part of the series -   Unlocking the Power of Experimentation: A Marketer's Insight. Welcome back, to another insightful journey into...

Holly Quilter | May 16, 2024

Azure AI Language – Sentiment Analysis in Optimizely CMS

In the following article, I showcase how sentiment analysis, which is part of the Azure AI Language service, can be used to detect the sentiment of...

Anil Patel | May 15, 2024 | Syndicated blog