Question

I'm new to Sitecore so forgive me if the answer is obvious. Is there a way to initiate a popup or alert bar for all users after they've logged in to the content editor of Sitecore? I work for a large organization with a few hundred active editors, and I'd like a way to inform them as we make changes to the toolbars and other functionality, or remind them to review our style guide before publishing content. If it's not an out-of-the-box feature, has anyone implemented a similar solution?

Was it helpful?

Solution 4

Customizing the login default page is pretty common. I think a faster and easier UX approach is to simply modify the login page (\sitecore\login\default.aspx, default.js, default.css) vs. doing some heavy lifting in code possibly when you login to the Content Editor. If what you need is a popup then simply display the popup on page load of the login page of some new features BEFORE they login. Then they can click out of the popup and then login to the Content Editor. Happy coding!

OTHER TIPS

There's no feature for this that I know of. However, you can alter Sitecore to do it.

The simplest thing you could do is add something to the following file: \sitecore\shell\Applications\Content Manager\Default.aspx

This is the content editor.

There are more elegant options, but since you're new to Sitecore, you might want to start with this - tread carefully though.

If you want to Generate Popup just after login then override the LOggedin Pipeline it is in sitecore.client dll. or write code on login.aspx under sitecore node.

You can add some custom Javascript into the Content Editor, from which you would be able to pull in some content via a custom web service call or using the Sitecore Web Item API.

This will fire every time the page is loaded. The content editor is refreshed using AJAX calls, so it should be only once, but you would want to put some logic in your JS to avoid re-showing the messages on multiple visits, maybe by setting a cookie with a date value so you are able to add more messages later.

(function($){     
    $(document).ready(function(event) {
        $.get("/services/messages.svc", function(data) {
            // if cookie is not set, or value set in cookie is older than returned value
            $("body").append(data);
            alert("Data was loaded: " + data);
            // set cookie that messages where shown
        });
    });
})(jQuery);

This will avoid any changes to default Sitecore files.

How you want to display the content to the user I'll leave up to you, just inspect the markup of the Content Editor in the dev tools. Either build up the markup in JS or return it from your web service, you can also add in your own CSS file to easily style your messages.

You could also take a look at this blog post on how to add warning messages into the Content Editor, also that may be a little confusing, I would usually use that approach for specific template types rather than universal messages. You are also limited to specific styling.

I would encourage you to look into Sitecore SPEAK UI framework. Here is a little guide on how to create an app and also launch it within the Sitecore client interface.

On to your question, Sitecore has some helper methods to invoke alert boxes or render UI differently. Start by looking at SheerResponse object and its available methods like ShowModalDialog or ShowAlertDialog. Also look into this answer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top