Jump to content

ProcessPageEditLink with multiple classes


jsantari
 Share

Recommended Posts

Is it possible in the  ProcessPageEditLink to define multiple classes as a group. I've tried to add more the one class to a line but this breaks things. Only single classes on a line seem to work. Using a css framework like Bootstrap it would be good to be able to create a class check box for example for the combined classes: btn btn-success btn-sm.

Link to comment
Share on other sites

You and I both know the right BS classes to use, clients don't. Ideally it would be really cool to have it usean alias for a group of classes - ex; 'Green Link' for 'btn btn-success btn-sm'. Sometimes there are BS theme tweaks involved too so again the alias approach would be more user friendly for the less informed.

Link to comment
Share on other sites

A textformatter would be the way to go if these button classes are subject to change (and most often they are). So you can easily just update the textformatter and everything will still work even for older texts. It's always good to keep html in the database as generic as possible so it's not going to cause problems if things change on the frontend.

  • Like 2
Link to comment
Share on other sites

59 minutes ago, LostKobrakai said:

A textformatter would be the way to go if these button classes are subject to change (and most often they are). So you can easily just update the textformatter and everything will still work even for older texts. It's always good to keep html in the database as generic as possible so it's not going to cause problems if things change on the frontend.

Good point.

Link to comment
Share on other sites

13 hours ago, kongondo said:

What about an autoload module that will make the changes on save? This way, it's done once. Or maybe JavaScript to make changes client-side on click' insert-link'? Hmm, maybe not be as elegant though.  Just some rumblings....

Good thought. Easiest way for now was to just swap out the single class for the multiple classes with jquery on dom loaded. Works fine.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...