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

[5.x] Add ability to set site on the mount_url tag #9561

Merged
merged 4 commits into from
Aug 15, 2024

Conversation

aerni
Copy link
Contributor

@aerni aerni commented Feb 21, 2024

This PR adds the ability to specify the site to use on the mount_url tag. This is helpful in a multi-site environment, where the collection isn't available in the site the tag is used on.

Example
I've got two sites, gounity and gomagazin. The events collection only exists in the gounity site. I want to link to the events collection mount from the gomagazin site. You can now do this by setting the site on the tag.

{{ mount_url:events site="gounity" }}

Without this PR, the tag would return null as the events collection isn't available in the gomagazin site.

@duncanmcclean duncanmcclean changed the base branch from 4.x to 5.x May 14, 2024 14:11
@duncanmcclean duncanmcclean changed the title [4.x] Add ability to set site on the mount_url tag [5.x] Add ability to set site on the mount_url tag May 14, 2024
@jasonvarga jasonvarga merged commit 0717b25 into statamic:5.x Aug 15, 2024
16 checks passed
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