-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
[AllBundles] URLChooser major changes #1225
Conversation
You’re modifying an interface. It’s as clear as it gets a breaking change. |
d066627
to
e47d154
Compare
cbe03b2
to
490f981
Compare
Can you rebase? |
Move to nodebundle Check if multidomain site Set correct values Move twig extensions Twig functions Add helpers Move url replace controller Host id Rewrite URLChooserType Pass correct hosts Change url chooser Changes Change default pageparts Add replace Url filter to page part generation Add replace url filter to text types Upgrade guide Set default label Add url tokens to media url chooser Add two route collections Move upgrade guide
681b882
to
353e9f1
Compare
@jockri done |
@@ -57,6 +56,12 @@ services: | |||
tags: | |||
- { name: 'twig.extension' } | |||
|
|||
kunstmaan_admin.multidomain.twig.extension: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to place this in MultiDomainBundle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can not put this in the MultiDomainBundle because the twig function needs to be available also when the MultiDomainBundle is not enabled.
URL Chooser
The URLChooserType had been rewritten.
You now have the option to add the following type of links:
We have added this rewrite especially for the MultiDomainBundle but it's completely integrated in the KunstmaanBundlesCMS.
When you choose for an internal link type, you will need to choose a link in the menu tree. On a multidomain website, you can switch you're domain on the right site of the URL chooser.
When clicking a node in the left node tree, a token is generated and saved for the URL.
For example: in a single domain website
Selecting the node in the tree with node translation id 50, will generate a token like "[NT50]".
For example: in a multi domain website
Selecting the node in the tree with node translation id 50, on domain "my_domain_en" will generate a token like "[my_domain_en:NT50]".
MAJOR CHANGE
For the new URL chooser to work, we have added a new twig filter "replace_url". This filter needs to be used to generate the correct url automatically.
When creating a new pagePart with an url field, the twig filter is automatically being added.
On all the exiting pageParts with an URLChooser field, you need to change the twig files of the pagePart and pipe all URL's to the replace_url filter.
When adding a rich text field or a wysiwyg field, you will need to pipe the output of this field also to the replace_url filter. Hereby, all URL's chosen in the wysiwyg will also be replaced correctly.