jsantari Posted January 18, 2017 Share Posted January 18, 2017 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 More sharing options...
kongondo Posted January 18, 2017 Share Posted January 18, 2017 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> Link to comment Share on other sites More sharing options...
jsantari Posted January 18, 2017 Author Share Posted January 18, 2017 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 More sharing options...
kongondo Posted January 18, 2017 Share Posted January 18, 2017 I see what you mean. Meanwhile, maybe there are workarounds to accomplish what you are after. I have nothing concrete atm . Link to comment Share on other sites More sharing options...
Robin S Posted January 18, 2017 Share Posted January 18, 2017 You could write a simple textformatter module to replace instances of "my-simple-class" with "my-long list-of class-names". Link to comment Share on other sites More sharing options...
kongondo Posted January 19, 2017 Share Posted January 19, 2017 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.... Link to comment Share on other sites More sharing options...
LostKobrakai Posted January 19, 2017 Share Posted January 19, 2017 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. 2 Link to comment Share on other sites More sharing options...
kongondo Posted January 19, 2017 Share Posted January 19, 2017 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 More sharing options...
jsantari Posted January 19, 2017 Author Share Posted January 19, 2017 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now