diff --git a/README.md b/README.md index 2fa8a582..02b2004f 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Complete installation requirements are exact same as for Strapi itself and can b **Supported Strapi versions**: -- Strapi v3.5.0 (recently tested) +- Strapi v3.5.2 (recently tested) - Strapi v3.x (This plugin may work with the older Strapi versions, but these are not tested nor officially supported at this time.) @@ -109,7 +109,6 @@ To setup the plugin properly we recommend to put following snippet as part of `c plugins: { navigation: { additionalFields: ['audience'], - excludedContentTypes: ["plugins::", "strapi"], allowedLevels: 2, contentTypesNameFields: { 'blog_posts': ['altTitle'], @@ -122,7 +121,6 @@ To setup the plugin properly we recommend to put following snippet as part of `c ### Properties - `additionalFields` - Additional fields: 'audience', more in the future -- `excludedContentTypes` - Excluded content types patterns (by default built-in and plugin specific content types) - `allowedLevels` - Maximum level for which your're able to mark item as "Menu attached" - `contentTypesNameFields` - Definition of content type title fields like `'content_type_name': ['field_name_1', 'field_name_2']`, if not set titles are pulled from fields like `['title', 'subject', 'name']` @@ -369,7 +367,17 @@ If you would like to use the [Strapi Molecules Audit Log](https://github.com/Vir ``` As a last step you've to provide the Navigation class to let Audit Log use it. To not provide external & hard dependencies we've added the example of class code in the `examples/audit-log-integration.js` . +## Examples +Live example of plugin usage can be found in the [VirtusLab Strapi Examples](https://github.com/VirtusLab/strapi-examples/tree/master/strapi-plugin-navigation) repository. + +## Q&A + +### Content Types + +**Q:** I've recognized **Navigation Item** and **Navigation** collection types in the Collections sidebar section, but they are not working properly. What should I do? + +**A:** As an authors of the plugin we're not supporting any editing of mentioned content types via built-in Strapi Content Manager. Plugin delivers highly customized & extended functionality which might be covered only by dedicated editor UI accessible via **Plugins Section > UI Navigation**. Only issues that has been recognized there, are in the scope of support we've providing. ## Contributing diff --git a/__mocks__/helpers/pages.settings.json b/__mocks__/helpers/pages.settings.json index c7457af8..797213e3 100644 --- a/__mocks__/helpers/pages.settings.json +++ b/__mocks__/helpers/pages.settings.json @@ -3,7 +3,7 @@ "kind": "collectionType", "collectionName": "pages", "info": { - "name": "pages" + "name": "Pages" }, "options": { "increments": true, diff --git a/admin/src/components/Item/index.js b/admin/src/components/Item/index.js index 2edbc0c0..cba24b62 100644 --- a/admin/src/components/Item/index.js +++ b/admin/src/components/Item/index.js @@ -15,8 +15,8 @@ import CardItemLevelAdd from './CardItemLevelAdd'; import List from '../List'; import CardItemLevelWrapper from './CardItemLevelWrapper'; import CardItemRestore from './CardItemRestore'; -import pluginId from '../../pluginId'; import ItemOrdering from '../ItemOrdering'; +import { getTrad } from '../../translations'; const Item = (props) => { const { @@ -25,6 +25,7 @@ const Item = (props) => { levelPath = '', allowedLevels, contentTypesNameFields, + contentTypes, relatedRef, isFirst = false, isLast = false, @@ -40,15 +41,18 @@ const Item = (props) => { title, type, path, + relatedType, removed, externalPath, menuAttached, } = item; const footerProps = { + contentTypes, type: type || navigationItemType.INTERNAL, removed, menuAttached, relatedRef, + relatedType, contentTypesNameFields, attachButtons: !(isFirst && isLast), }; @@ -88,9 +92,7 @@ const Item = (props) => {