Extend/Override Form Macros



  • @nWidart

    But that macros.php can be overriden from the Core?


  • admin

    No, it should be new macros. Ie: with new unique names.



  • @nWidart

    Hm... not sure if I get it.

    The problem I'm facing is that if I change the backend theme, I'm tied to use the icheck.blue.css assets, and I'm not being able to change them unless I modify all core files that references to icheck-blue (those in views, and the asset pipeline in controllers).

    Makes this any sense? I'm missing a workaround?

    (The only workaround I've found so far is to edit the asgard.core.core.php and give a faux identifier for icheck.blue.css, and pointing it to the green.css skin, but even with that I have to change flat-blue class by flat-green class).


  • admin

    Ah I see, you want to change all checkboxes to something else.

    In that case you have to overwrite the adminlte theme yes, and probably the views of modules with checkboxes.



  • @nWidart

    All right, so I should remove the core's macros.php from .gitignore and switching the class I need there, isn't it?

    Alternatively, I've created a new theme over AdminLTE theme, but some stuff like the icheck is still a bit dependant of some core files.


  • admin

    hm yes, that's correct.



  • @nWidart

    All right, understood.

    A last question: about all those classes and JavaScript into the modules' views, then the way to go and to mantain it into a repo, affecting the less any potential composer update would be to publish all modules' views ?


  • admin

    Yeah that would fix the issue you're facing now. Having every module publish its views, just like the user module does. This way you can customise the form as you please.

    Maybe a good idea for a pull request :)



  • @nWidart

    Fantastic, thanks!

    About that pull request, I'd certainly love to do so, but I'm a bit busy on the project I'm working on right now.

    If possible, in a future, I will try to "untie" this dependency from the core modules, and letting this to be configurated from the theme, but I'll do with a vanilla installed CMS.


  • admin

    Hehe yea no worries, I have the same "issue" too, buried under work and less time to dedicate to the cms.


Log in to reply
 

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.