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

ContentTypeAlias undefined for settings section #78

Merged
merged 3 commits into from
Nov 9, 2017

Conversation

djscorch
Copy link

This pull request implements issue #69

In the JS file we added a fallback for ContentTypeAlias. In the controller let the settings section work in the same way as the content section.

Copy link
Collaborator

@mattbrailsford mattbrailsford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to address the issue of whether you are editing a media type or content type before it can be pulled in.

@@ -46,6 +46,7 @@ public object GetDataTypeByAlias(string contentType, string contentTypeAlias, st
case "member":
ct = Services.MemberTypeService.Get(contentTypeAlias);
break;
case "settings":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue we have is that in the settings section you could be editing a content type or a media type so you need to figure out what type is being edited and redirect accordingly. Maybe do an early check for "settings" section before the switch statement and figure out what type you are editing then set the section variable to "content" or "media" respectively?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any suggestions on how to get the setting type? There doesn't appear to be a SettingTypeService or similar.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I think the only way you could do it is to detect it in the angular code (seeing what the URL of the page your are on is and if it's a type editor, what entity type it is) and then pass that in instead of the current "settings" value on this line: https://github.com/djscorch/umbraco-vorto/blob/f1e44d7920b8a9fb441e37e5661522ad59b22785/src/Our.Umbraco.Vorto/Web/UI/App_Plugins/Vorto/js/vorto.js#L314

@jajeffries
Copy link

It looks like this pull request has been updated since your last comments @mattbrailsford and I've tested it on a project and it fixes #69 for me.

What else needs to be done to get this approved and merged?

@mattbrailsford mattbrailsford merged commit 51d9760 into umco:master Nov 9, 2017
@mattbrailsford mattbrailsford added this to the 1.6 milestone Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants