primocms / primo

Primo is a visual CMS with a built-in code editor, Svelte blocks, and static site generator.
https://primocms.org
MIT License
1.92k stars 474 forks source link

Pages limited to 2 levels #291

Closed rallisf1 closed 11 months ago

rallisf1 commented 1 year ago

Is your feature request related to a problem? Please describe. I need to have /category/subcategory/page in a project

Describe the solution you'd like Allow for infinite levels

Additional context This should be an easy fix since there is already a parent field in db. Just have to make the code dynamically support multiple levels as it is currently hard-coded to 1 or 2 levels.

rallisf1 commented 1 year ago

Did some progress on https://github.com/rallisf1/builder/tree/feat/page-levels and https://github.com/rallisf1/primo/tree/test/page-levels but not yet functional. I yet can't figure out why it makes no requests (aka not sending to supabase) when creating a sub-level 2 page.

P.S. I had to include the builder dist directory and link it via my github repo for my tests to work via vercel, I will make new "clean" branches before PRs.

P.S.2. I removed the supabase query from the builder as it breaks functionality when working with json projects. I found a way around it. Currently testing locally.