carbon/navigation

Navigation and frontend redirect helper for Neos CMS

Installs: 2 579

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 1

Open Issues: 0

Language:HTML

Type:neos-carbon

5.3.0 2022-04-04 16:23 UTC

README

Latest stable version Total downloads License GitHub forks GitHub stars GitHub watchers

Carbon.Navigation Package for Neos CMS

This package provides various helps for implementing navigations in your Neos site.

NodeTypes

All Node Types are marked as abstract. So you have to include them as supertypes if you want to use them. You can read more about Node Type definition here.

Carbon.Navigation:NotInMenu

Hide the property _hiddenInIndex. Defined in NodeTypes.NotInMenu.yaml

Carbon.Navigation:HideSeo

Turn off all type of SEO properties. Defined in NodeTypes.HideSeo.yaml

Carbon.Navigation:RedirectToParentPage

(Only in the live context) Redirect the user to the parent page. Defined in NodeTypes.RedirectToParentPage.yaml and ToParentPage.fusion

Carbon.Navigation:RedirectToFirstChildPage

(Only in the live context) Redirect the user to the first child page, if available. If not, the user gets redirected to the parent page. Defined in NodeTypes.RedirectToFirstChildPage.yaml and ToFirstChildPage.fusion

Carbon.Navigation:References

Insert a property called navigationreferences. It is handy if you want to create a navigation and wants to let the editor to choose which documents should be included. However, you can also pass a custom collection to the Fusion prototype. Defined in NodeTypes.References.yaml and References.fusion

Menu Fusion prototypes

You can edit the default behavior of each fusion prototype in your Settings.yaml. You can set the configuration via Settings.yaml or directly in the corresponding Fusion prototype. The Setting is here to provide an easy way to change some basics without writing Fusion code. If you don't have any entries, no markup at all gets rendered. No more empty <ul> anymore!

Properties for all menu prototypes

The renderClass

The renderClass entry in the setting for each menu type defines the CSS classes for this particular menu. It has three subkeys: list, element and link. Everyone of this key as further entries. If the keys are set to false, this type of class gets not rendered.

Look at Settings.yaml for the default values for the different menu types

Carbon.Navigation:Mixin

Basic Mixin for Menus. Based on Neos.Neos:MenuItems.

Defined in Mixin.fusion

Carbon.Navigation:Menu

Render a menu with items for nodes. Based on Neos.Neos:MenuItems. Besides the default properties following properties are available:

Defined in Menu.fusion

Carbon.Navigation:References

Provides a list of links, based on nodes which are set in the inspector. Based on Carbon.Navigation:Mixin. itemCollection is set to the closest instance of Carbon.Navigation:References who has the property navigationreferences set. maximumLevels defaults to 1 and renderHiddenInIndex defaults to true.

Defined in References.fusion

Carbon.Navigation:Breadcrumb

Provides a breadcrumb navigation based on the current node. Based on Carbon.Navigation:Mixin. listTag defaults to 'ol'.

Defined in Breadcrumb.fusion

Carbon.Navigation:Dimensions

Create links to other node variants (e.g., variants of the current node in other dimensions) by using this Fusion object. Extends Neos.Neos:DimensionsMenu. If no specific dimension is set, the Neos.Neos:DimensionsMenu prototype output the label from the node, and not the dimensions label. This prototype also fixes this wrong behavior.

Defined in Dimensions.fusion

Carbon.Navigation:Label

A small helper to get the label for an menu entry. Per default, it reads the item.label property. If you want to output just the title you can edit the prototye e. g. like this;

prototype(Carbon.Navigation:Label) {
    renderer = ${q(props.item.node).property('title')}
}

Defined in Label.fusion