M2M on Tree Menu

M2M on Tree Menu, a forum discussion on Jojo CMS. Join us for more discussions on M2M on Tree Menu on our Administration (backend and configuration) forum.

Back to Forum Index : Back to Administration (backend and configuration)   RSS
Rick Rick

8 Jun 2012
Posts: 336

I just committed an update that lets you set a Many2Many relationship as the structure for the Tree menu on /edit/

Brings some structure using M2M as categories.

Simply (run /setup/ then) edit the tabledata and add the many2many field name under "M2M field" on the Categories tab. Populate the tree branches using the table specified in the M2M settings for that field.

Also, and much more importantly, I think I borked the repo. I did a pull before the commit/push but it appears I've thrown the repo sideways with what looks like some of Jaijaz's updates. This could just be showing the merge from when I pulled, but I'll double check when I'm actually awake.
Jaijaz Jaijaz

8 Jun 2012
Posts: 215

Flu at the moment means I'm struggling to get my head around stuff at the moment but look forward to checking out the M2M stuff.

Re the repo though I can't see anything wrong with the Github master so should be all good.

I have started a new local branch where I'm redoing LessPHP better and putting Bootstrap in properly. I also started with your latest CSSTidy branch as trying to get pull that awesome update into my other branch wouldn't play well.

Hopefully when I get over this bug I will finish it off.
If you not living on the edge you taking up too much space.
Rick Rick

8 Jun 2012
Posts: 336

Hope you get over the bug soon, I seem to be getting a very mild version of each bug I encounter. None of them are pleasant.

The M2M list had been nagging me for a while... I want to use M2M in more places (possibly even articles, not sure) but the items list quickly got out of control.

I know the LessPHP stuff is your baby, but I had a few ideas... Could we simplify the stitcher stuff so that there was a hook/filter at the start and end of the stitcher. Then the core could use the API to jump in at the start and add in all css/vars.less, css/mixins.less etc files then add the files as normal and then jump in at the end to do the processing on it?

We could also abstract it further by simply calling a filter for each stylesheet/js file (such as css/styles.css and js/functions.js) where the core could use the API to jump in and cycle through the core+plugins+theme files to add all the files that it currently does via being hardcoded. Then plugins could use the API to add externals into the combined files.

These filters could either be the raw contents, or an array where each item is
  • a filename
  • OR file contents
  • a flag saying whether to combine or override


So files like "css/style.css" can be "combined" but one you can also have two plugins both add "external/jquery.foobar.js" (with the 'override' flag) and only one copy of the file will be included.

Lots of changes there but that's where I was thinking of taking the stitcher when I got time. If that helps you with your LessPHP stuff, then awesome. If not or if they're all bad ideas, that's fine too.
Back to Forum Index : Back to Administration (backend and configuration)   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.