Comments (4)
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.
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.
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.
this is sort of done with the placeholder fields. closing
from django-cms.
Related Issues (20)
- [feat] Without public home page, a 404 error is raised HOT 18
- [BUG] toolbar.obj is not set correctly in edit view when apphook landing page is a CMS page HOT 2
- Bounty program HOT 2
- [BUG] The sign up page https://www.django-cms.org/en/sign-up-work-contribution/ doesn't get pass the catchup HOT 1
- [BUG] Migrating with another database other than "default" HOT 3
- [BUG] Placeholder inherit raising "NoneType should implement get_template" if used on an apphooked page HOT 2
- [BUG] With versioning enabled, "Show in Menu" does not work in page tree HOT 2
- [BUG] 404 page not found error without a trailing slash for "/en" and "/en/admin" URLs. HOT 1
- [DOC] code update
- [BUG] create_page_content API adding two cms_pagecontent records instead of one HOT 3
- [BUG] A new page can be edited after creation
- add language page return coroutine object has no attribute 'set_cookie' [BUG] HOT 2
- add language HOT 2
- [ENHANCEMENT] Add RTL support for the pagetree HOT 4
- [BUG] `./manage.py cms delete_orphaned_plugins` might create an inconsistent plugin tree
- fix separately
- Clarify the necessity of this and the line above
- [BUG] Cms check show wrong error HOT 3
- [BUG] Adding a plugin to an apphooked page as admin raises permission error HOT 35
- [BUG] Only users with advanced page permissions can change page permissions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-cms.