-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Introduce a consistent content API #2454
Comments
Yes, we probably need to take a step back and see how Page and Content block all fit together as an abstraction. This will probably impact how we adapt the Headless CMS use case as well. |
Another use case: SEO analysis on content incl. blocks - Quinn-Interactive/silverstripe-seo#16 |
Might be another related issue: #2393 |
Apologies if I'm not caught up on usages, however my question related to this is in terms of "linking" modules that are considered supported. This may be a whole other can of worms, but it would be amazing for the linking UX available in the WYSIWYG editor to be available as a field in a community module. The topic is mainly here from my understanding. In my shared experience the full linking UX is "expected" by CMS users, while there are a number of implementation options currently. I understand this is likely something outside of the realm of the core implementation, however clearly defining the best use case for the community in supporting linking outside of the WYSIWYG may be beneficial. That being said, I think providing a consistent API, similar if not what is suggested in this RFC, will help level this out moving forward for the community. Linking has become increasingly complex and identifying a path for developers to consistently and confidently provide link tracking would be a very welcome improvement. |
Background
Historically, content of a page has been built and saved into the
Content
field onSiteTree
. A lot of parts of SilverStripe take this for granted now:-
cwp-search
configuration offulltextsearch
:https://github.com/silverstripe/cwp-search/blob/14f469e158169c62c71589ccf41a4bbe44cdcf91/src/Solr/CwpSolrIndex.php#L17-L23
- Broken external links in
silverstripe/externallinks
:https://github.com/silverstripe/silverstripe-externallinks/blob/c9f5ca6c722843ae563bfe2b23904737f218d8d0/src/Tasks/CheckExternalLinksTask.php#L184
- Broken link tracking in CMS:
This actually looks at all fields on a page, not just the page itself
silverstripe-cms/code/Model/SiteTreeLinkTracking.php
Lines 119 to 131 in 115ed92
In a similar vein we have some interesting situations occurring since
SiteTreeLinkTracking
was applied to everyDataObject
:silverstripe-cms/_config/linktracking.yml
Lines 4 to 6 in 0ecdba3
This now fills the "Dependant Pages" tab on pages with a bunch of items that aren't actually pages - causing issues:
SiteTree
silverstripe-subsites#436At the moment all modules/functionality that want to interact with the content of a page need to do this in their own magic way, and can't really aggregate the content. I'm proposing that we move towards giving a more consolidated API for content as we move towards the idea of having content existing on more than just the
SiteTree
(ie. content blocks).Potential goals
CMSEditLink
provides an edit link that may or may not be the page. In the future, content will hopefully all be edited from the pagesilverstripe/externallinks
) we edit the content to add DOM. Ideally if you want to implement this functionality won't have to determine whichHTMLField
s are relevant.Keen to hear thoughts before I go ahead and think about solutions and designing some interfaces.
The text was updated successfully, but these errors were encountered: