Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
strapi-plugin-permalinks
Advanced tools
A plugin for Strapi CMS to enable permalinks for content types with nested relationships.
A plugin for Strapi CMS to enable permalinks for content types with nested relationships.
Kinda like WordPress, but not 👍🏻
yarn add strapi-plugin-permalinks@latest
property | type (default) | description |
---|---|---|
contentTypes | array ([] ) | An array of objects describing which content types and fields should use permalink features. |
contentTypes
An array of objects describing which content types and fields should use permalink features.
Each object in the array requires a uid
, targetField
, and targetRelation
props. The field name "slug" is recommended for the targetField
value because it represents the unique part of the URL path, but it is not required. Similarly, the relation name "parent" is recommended for the targetRelation
, but is not required.
Consider we have a Page
content type which has a title
field, a uid
field named slug
, and relation field named parent
with a "has one" relationship to other Pages
.
Let's configure the Page
content type to use permalinks.
module.exports = {
'permalinks': {
enabled: true,
config: {
contentTypes: [
{
uid: 'api::page.page',
targetField: 'slug',
targetRelation: 'parent',
},
],
},
},
};
Assign a parent relation to a page to automatically generate a URL path that includes the slugs of it's parent pages.
All child pages will automatically have their slug fields updated when the slug of their parent changes. This extends down to all descendant pages.
Deleting a page that has children will orphan those child pages. The parent relation will be removed from the child pages but no other changes to their data will occur.
If orphaned pages exist, you will see their slug value in the content manger list view as a red label instead of plain text.
Editing the orphaned page will display a warning and an error message on the target field. From here you can assign a new parent or no parent at all. Upon saving, any children of the page will also update their target fields to reflect to new parent slugs.
Better conflict resolution regarding updated/deleted pages is on the roadmap.
InputUID
component (currently required to function).FAQs
A plugin for Strapi CMS to enable a URL path field for content types with nested relationships.
The npm package strapi-plugin-permalinks receives a total of 126 weekly downloads. As such, strapi-plugin-permalinks popularity was classified as not popular.
We found that strapi-plugin-permalinks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.