You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -118,7 +118,7 @@ This means that if you simply add 5 Kirby pages to the field in multilang mode a
118
118
119
119
The plugin allows you to add "Kirby Pages" and "Custom Links" to the navigation field. For "Kirby Pages", the page title will be the default value of the link text, if no custom link text is entered. This means that if you simply add 5 Kirby pages to the field in multilang mode and don't edit the links, you will see the language-specific page title and page URL in the generated markup.
120
120
121
-
## What is new in version 4.0?
121
+
## What's new in version 4.0?
122
122
123
123
Changes worth mentioning:
124
124
- It works with Kirby 4
@@ -131,6 +131,34 @@ Changes worth mentioning:
131
131
- Markup: the current language and the actual values of the page title and page URL are taken into account when generating the markup for the field in the template.
132
132
- Markup: link text and link attributes are properly escaped to prevent potential issues
133
133
134
+
## What's new in version 4.1?
135
+
136
+
New features:
137
+
- The 'class' and 'target' values of links are now editable
138
+
- The 'anchor' values of 'Kirby page' links are now editable
139
+
- The 'title' textfield can be hidden, if you do not need it
140
+
- The 'popup' toggle can be hidden, if you do not need it
141
+
142
+
Different sites have different needs, so the editable fields are configurable via /site/config/config.php.
143
+
144
+
Here are the available options that you can use in your config.php, and their default values:
145
+
146
+
```php
147
+
return [
148
+
'chrisbeluga.navigation.edit_title' => TRUE,
149
+
'chrisbeluga.navigation.edit_popup' => TRUE,
150
+
'chrisbeluga.navigation.edit_target' => FALSE,
151
+
'chrisbeluga.navigation.edit_class' => FALSE,
152
+
'chrisbeluga.navigation.edit_anchor' => FALSE,
153
+
];
154
+
```
155
+
156
+
For example, if you want to customize the 'target' value of your links, then set 'chrisbeluga.navigation.edit_target' to TRUE. This will replace the simple 'Popup' toggle with a 'Target' textfield, allowing you to set a link target, such as '_parent' or '_top'.
157
+
158
+
If you want to add an anchor value to your 'Kirby page' links, for example to have an URL such as /en/contact#locations, set 'chrisbeluga.navigation.edit_anchor' to TRUE. You can enter 'locations' as anchor, and '#locations' will be appended to the page URL of the link.
159
+
160
+
If you use the recommended way to output the navigation markup from your template (such as $site->navigation()->toNavigationMarkup() in case of a field called 'navigation'), then any target, class and anchor values will be included automatically in the generated markup.
161
+
134
162
## Contributing
135
163
136
164
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
0 commit comments