Style alerts and confirmation dialogs

Sharon Parry asked on February 4, 2015 22:37

This project is a version 7 portals site, with ecommerce and blogs. Brief calls for all alerts and confirmation dialogs to be styled according to very specific requirements.

I know this isn't possible for standard alerts/confirmations and the best solution is to use something like the Telerik RadWindow popups, or roll your own along the lines of link text.

Has anyone done this in a way that ANY possible alert/dialog that a Kentico site is going to display to the user can be automatically styled? Or do I have to find all occurrences of alerts and confirmations for this particular site and try to hack something up for each one? (Not even sure whether that's possible anyway!)


Recent Answers

Brenden Kehren answered on February 5, 2015 01:17

Are you talking about doing this within the Kentico CMSDesk or Site Manager or simply in your site? If in your site, there are many plugins or frameworks that do this. For instance the Bootstrap has model you could combine with an alert as does Foundation. Bootstrap has specific styles for an alert too as does Foundation.

Using either of these in part or whole would require you to make some modications to your markup and possibly add javascript to your site

0 votesVote for this answer Mark as a Correct answer

Sharon Parry answered on February 5, 2015 01:31

Hi Brenden,

I'm talking about dialogs that display on the site, rather than those that display specifically to editors/administrators within CMSDesk and Site Manager, such as the ones that display when customer performs various functions in the shopping cart, eg, empty shopping cart - that one in particular is added as a javascript confirm to the btnEmpty.OnClientClick in the page OnLoad.

This is also a project that I've "inherited", so jumping into Bootstrap (or similar) at this stage isn't really a practical option.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on February 5, 2015 14:38

Using bootstrap (or similar) could be an option if you have a lot of messages or alerts. You can simply implement the pieces you need to get the alerts and such working with your current code, you don't need to implement all of it. Or you can create your own. Either way, there will be what sounds like enough work to go through creating some javascript or server code along with styling to get what you desire.

One more thing to note, in v7 you're limited with what you can do without customizing the out of the box webparts and controls when it comes to things like this. In v8, it's all transformation driven and makes your design and changes much easier to handle. I'm not saying upgrading is the all time fix, but it sure could make things a bit easier.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.