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

Include showSiteMenu option in elementSelect field #3494

Merged
merged 1 commit into from
Nov 26, 2018

Conversation

monachilada
Copy link
Contributor

I'm not sure if there's a reason why this isn't included, but it would be nice if showing the showSiteMenu could be configured in cases where the Craft.BaseElementSelectInput is being included in for example a custom field type.

I'm not sure if there's a reason why this isn't included, but it would be nice if showing the `showSiteMenu` could be configured in cases where the `Craft.BaseElementSelectInput` is being included in for example a custom field type.
@brandonkelly
Copy link
Member

It’s not included because Craft doesn’t have the ability to create relationships or reference tags for an element on a specific site. Being able to choose the site when selecting an element would give you the impression it was going to record the site you selected as part of the relation.

Do you have a use case where the selected site will actually be recorded?

@monachilada
Copy link
Contributor Author

It came up in conjunction with this plugin, which is including the template and hence why it would be nice to override this setting.

The use case is that I have a jobs section that is enabled for only the primary site (German), since job posts won't be translated into the secondary language (English). However, I have a news section that uses the craft-linkfield field type to link to entries, and I'd like to be able to link to the German job post from an English news article, but since it's disabled for English and there is therefore no equivalent, then obviously nothing will show up in the entries modal from the jobs section. If I could switch the site in the modal, then I could still choose the German version to link to, if I wished.

@brandonkelly brandonkelly merged commit 8009631 into craftcms:develop Nov 26, 2018
@brandonkelly
Copy link
Member

Thanks for the explanation! Just merged for tomorrow’s release.

brandonkelly added a commit that referenced this pull request Nov 26, 2018
@monachilada monachilada deleted the patch-1 branch November 26, 2018 22:25
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.

2 participants