Skip to content
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

Add "content" listing to CMS #342

Closed
jimafisk opened this issue Sep 24, 2024 · 3 comments
Closed

Add "content" listing to CMS #342

jimafisk opened this issue Sep 24, 2024 · 3 comments
Labels
breaking Change that's not backwards compatible with previous versions cms Git-backed content editing

Comments

@jimafisk
Copy link
Member

We should have a directory that lists all the content items across the site, so folks can filter by type and locate items that are not necessarily displayed in their custom frontend.

It might make sense to consolidate the existing "add" section under this panel as well, since it's all related to content.

@jimafisk jimafisk added the cms Git-backed content editing label Sep 24, 2024
jimafisk added a commit that referenced this issue Sep 24, 2024
@jimafisk
Copy link
Member Author

jimafisk commented Oct 4, 2024

The first iteration of a content listing admin modal is available in v0.7.0

The previous "add" section has been combined into this new panel.

@jimafisk
Copy link
Member Author

jimafisk commented Oct 8, 2024

Just want to note that in v0.7.1 I updated the evaluation of paths to include a leading forward slash / if no baseurl is set in your plenti.json config file. This makes content paths root relative by default (you could have already done this with route overrides in plenti.json or hardcoding forward slashes in your templates).

If you were manually hardcoding leading forward slashes in your templates like:

<a href="/{content.path}">

This will make your paths start with double forward slashes, which will remove your TLD and break your navigation. Because of this, I'm adding a breaking label to this issue. If this happened to you, fix your site by simply removing the hardcoded forward slash:

<a href="{content.path}">

@jimafisk jimafisk added the breaking Change that's not backwards compatible with previous versions label Oct 8, 2024
@jimafisk
Copy link
Member Author

Initially we were forcing a root relative URL (leading forward slash /) on all content paths if the baseurl wasn't being set in the plenti.json config. I realized that you should be able to set whatever path pattern you want using a route override in plenti.json, so the update in v0.7.3 only does this if you're using the default routes (e.g. content_type/filename) and haven't set a baseurl. Another way of stating this is: if you're using a route override, you can omit the leading forward slash even if you haven't set a baseurl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Change that's not backwards compatible with previous versions cms Git-backed content editing
Projects
None yet
Development

No branches or pull requests

1 participant