Jump to content

Recommended Posts

Posted

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.

Posted

How is that different from selecting a checkbox, one each for btn, btn-success and btn-sm? Works for me just fine.

<a href="/blog/" class="btn btn-success btn-sm"></a>

Posted

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.

Posted

You could write a simple textformatter module to replace instances of "my-simple-class" with "my-long list-of class-names".

Posted

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....

Posted

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
Posted
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.

Posted
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.

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
×
×
  • Create New...