Coder Social home page Coder Social logo

Comments (4)

oliwarner avatar oliwarner commented on May 1, 2024

This can be relatively simple from a backend perspective.

All that needs to happen to get things linking up correctly is making the Placeholder model link to any model. This could be done with contenttypes (slow) or it could be done by changing the object reference (page, currently an FK on Page) to a string and doing some simple serialisation.

So instead of storing a page pk (eg 3), it stores "Page:3".

This does mean that Placeholder wouldn't be easily able to look up the tree (ie access the Page object). I'm not sure if that's an issue but it would be anyway as if Placeholders are bound to non-page objects, they're not going to have Page-like footprints anyway. I would suggest making Placeholder completely independent.

The second and larger point to all of this is editing the Placeholders. There would need to be some interface. There could be an admin widget that gets thrown around but I think this would be a great opportunity to explore some on-page editing.

It would be relatively simple from there for non-CMS views to load the editing framework.

from django-cms.

digi604 avatar digi604 commented on May 1, 2024

the problem we have at the moment is that we only can link to existing rows. So if you would use this in a blog for example. You would need to save the blog entry first before you can add plugins. This is very ugly on my point of view and I probably will do something like a generic foreign key and a custom edit-inline... something similar that feincms has but with our interface. Instead of placeholders we would make the whole thing a model.field or form.field.

from django-cms.

oliwarner avatar oliwarner commented on May 1, 2024

You would need to save the blog entry first before you can add plugins

I don't see that as a major issue. The model I'm basic this on is Concrete5.
http://www.concrete5.org/

It's a PHP CMS that has a few things wrong with it (PHP for one) but its editing interface is pretty awesome (see the video on their homepage).

To create a page in that model, you have to create the page first and then you're presented with edit zones (placeholders if you will) that you can add "blocks" (plugins here) to. It works really well as an editing route.

from django-cms.

ojii avatar ojii commented on May 1, 2024

this is sort of done with the placeholder fields. closing

from django-cms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.