Skip to content
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

Merged
merged 1 commit into from
Jul 14, 2016

Conversation

sandergo90
Copy link
Contributor

@sandergo90 sandergo90 commented Jul 1, 2016

Q A
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Fixed tickets

URL Chooser

The URLChooserType had been rewritten.

You now have the option to add the following type of links:

  • Internal
  • External (external links or for example anchors)
  • Email (mailto: will be automatically added)

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.

@sandergo90 sandergo90 changed the title Urlchooser multidomain [WIP] Urlchooser multidomain Jul 1, 2016
@mlebkowski
Copy link
Contributor

You’re modifying an interface. It’s as clear as it gets a breaking change.

@sandergo90 sandergo90 changed the title [WIP] Urlchooser multidomain URLChooser major changes Jul 4, 2016
@jockri
Copy link
Contributor

jockri commented Jul 11, 2016

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
@sandergo90 sandergo90 changed the title URLChooser major changes [AllBundles] URLChooser major changes Jul 12, 2016
@sandergo90
Copy link
Contributor Author

@jockri done

@@ -57,6 +56,12 @@ services:
tags:
- { name: 'twig.extension' }

kunstmaan_admin.multidomain.twig.extension:
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@jockri jockri merged commit dbee787 into Kunstmaan:sf3 Jul 14, 2016
@jockri jockri added this to the 4.0.0 milestone Jul 14, 2016
@sandergo90 sandergo90 deleted the urlchooserMultidomain branch December 1, 2016 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants