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

U4 10351 configurable content templates #2146

Conversation

lars-erik
Copy link
Contributor

@lars-erik lars-erik commented Aug 23, 2017

Edit: In order to learn with this PR does and test it, have a look at the Configuring content templates section at the bottom of this article: https://24days.in/umbraco-cms/2017/building-from-blueprints/

@nul800sebastiaan nul800sebastiaan changed the base branch from dev-v7.7 to dev-v7 September 21, 2017 06:31
@nul800sebastiaan
Copy link
Member

@lars-erik I am not entirely sure what this does! 😂

Can you please explain?

This probably also affects the PR I just merged: #3173

I'll close this one for now but maybe if we get more clarity as to why this would be useful for the majority of Umbraco users, we can consider re-opening it! 👍

Cheers, Seb.

@lars-erik
Copy link
Contributor Author

@nul800sebastiaan I don't presume you remember demos Sunday night at the retreat 2017. I had barely managed to squeeze in configuration of content templates to the degree that you could chose whether to allow creating new "blank" documents or whether you'd like to skip the content template selection and just use "the one".
@clausjensen asked "could that be done per doctype", and drunk as I were and late as it were I said some foul words and blew it off.
Later last fall I regretted that and dutifully added the requested functionality. With this you can configure whether blanks or selection at all is available per doctype instead of globally.
It was barely mentioned at the end of my 24days.in article for 2017.
It was also fairly well discussed and documented on the old issue tracker. I think the last comment from HQ was @Shazwazza telling @madsrasmussen that he should give the configuration method a look since it's worth noting for the backoffice in general. Possibly for V8.

Any other questions? ;)

@clausjensen
Copy link
Contributor

I guess I'll have a hard time saying it's a bad idea since I was the one asking for it 😛

... I still think the feature is worth getting in, but don't mind that it would be in v8 .. resources are better spent adding it there than in v7 if there's too much merge work involved.

@lars-erik
Copy link
Contributor Author

This is an addition to code nobody has touched since I wrote it. (except said PR I didn't check out)
It should be effortless to merge and if we're lucky, maybe @KimHolzmann would pitch in and implement any subsequent needs introduced by said PR. ;)

I understand you're obviously under huge V8 pressure nowadays looking at tweets and whatnot. Please calm the suits or whoever pushes that hard. I know at least the gold partners I know want it when it's ready.

@KimHolzmann
Copy link
Contributor

Have been jumping around the old post now :-)
I short - if a user can see and select a blueprint, the user must have the ability to edit in the blueprint to, from the content section - right ?

@lars-erik
Copy link
Contributor Author

@KimHolzmann Not sure if we discuss the same thing now. But reg. access, I think we added access demand to creating and editing blueprints, not creating docs from them. So you get to "create blueprint from document" and edit them under settings with the special access.
The config in this PR is how the UI should behave when you select blueprints for new docs. It's not using any user settings, it's just some extra json in a javascript referenced in a package manifest.

@nul800sebastiaan
Copy link
Member

nul800sebastiaan commented Oct 24, 2018

@clausjensen It's only a few lines of code so v7 is fine.

@lars-erik From what I understand now: you can configure a blueprint to be ALWAYS used when adding a new document of type, which means that you no longer get to choose between either a blank document of doctype X or a blueprint of doctype X.

So basically, from what I gather here, is.. we've implemented "default values"? 😁 🎉

Is that the "only"(😉) thing this does?

@lars-erik
Copy link
Contributor Author

Before this PR you can globally configure

  • Whether blank documents are allowed when there are content templates for the selected type
  • Whether to skip selection and just use the one existing template

After PR you can configure the above per doctype.

@KimHolzmann
Copy link
Contributor

KimHolzmann commented Oct 24, 2018

okay got it now :-)
"Whether to skip selection and just use the one existing template" or two or ........
if more tha one select only from templates then - right. (if no blank allowed)

@KimHolzmann
Copy link
Contributor

Just for me ;-)
where is it possible to set this config global ?

@lars-erik
Copy link
Contributor Author

@KimHolzmann
Copy link
Contributor

thx :-)

@nul800sebastiaan
Copy link
Member

@lars-erik AHA!

Now it all makes sense, that's the explanation I needed here.

@lars-erik
Copy link
Contributor Author

:)

@KimHolzmann
Copy link
Contributor

just to be sure, there is nothing I shall do in this issue :-)

@lars-erik
Copy link
Contributor Author

Depends on how you implemented it in lists. (I purely forgot about that route)
If you re-use the dialog popped from the tree then I guess you're home free.
If you don't, you probably don't respect this config at all, hence yes, you should.
At least the global config if this isn't merged.

@KimHolzmann
Copy link
Contributor

I use the allowed property, I will look at this after this is merged then,
makes sense ?

@lars-erik
Copy link
Contributor Author

Not that property.

See this injectable angular value:

angular.module("umbraco").value("blueprintConfig", {

And how it's used:

and in the view:

<li class="sep" ng-show="allowBlank">

Those are extended per doctype when/if this gets merged. But they are there today for the global config.

@KimHolzmann
Copy link
Contributor

okay I will look at this according to the global config for now, to see how it's behave :-)

@lars-erik
Copy link
Contributor Author

#h5yr

@emmaburstow emmaburstow self-assigned this Oct 24, 2018
@emmaburstow
Copy link
Contributor

Ok - I think I'm up to date on this. Will have a play this afternoon!

@KimHolzmann
Copy link
Contributor

Okay :-)
I can confirm, that the logic on the content page / view don't use the global config, as @lars-erik mentions.
looking in to this now.

@emmaburstow
Copy link
Contributor

I've spent the afternoon playing with this. The skip select works exactly as advertised. Allow blank too. Is there still more to come @KimHolzmann? I can check back in tomorrow.

@KimHolzmann
Copy link
Contributor

I will not be able to finish the logic for the listview before Friday, I have to work tomorrow.

@emmaburstow
Copy link
Contributor

Brill. Thanks @KimHolzmann. Well, so far so good!

@KimHolzmann
Copy link
Contributor

Hi again :-)
how can I pull the changes @lars-erik has made ?
I don't have this pr. in my code, only the merged pr's.

@lars-erik
Copy link
Contributor Author

Add my repo as a remote in your local git repo.

@lars-erik
Copy link
Contributor Author

Unless @nul800sebastiaan is ready to merge. ;)

@KimHolzmann
Copy link
Contributor

thx :-)

@zpqrtbnk zpqrtbnk changed the base branch from dev-v7 to v7/dev March 31, 2019 16:34
@nul800sebastiaan
Copy link
Member

Hey there @lars-erik !

I'm writing today after announcing at Codegarden, our yearly conference, that the upcoming version 7.15.0 will be the last Umbraco v7 release with new features in it. From now on all our efforts will be focused on version 8 instead. 🎱

We're wrapping up the 7.15 version at the moment and unfortunately these proposed changes won't be able to make it in there.

We'd like to extend a big thank you the efforts on this so far and we would love it if you could have a look at porting this feature over to v8 instead. Of course if you have any questions on where to start then feel free to ask on the forum, we monitor all questions there and we're happy to assist.

Thanks again for the work in this PR and we hope to see you contributing to v8 some time soon!

Best, Sebastiaan and the Umbraco CMS team.

@lars-erik lars-erik deleted the u4-10351-configurable-content-templates branch April 27, 2020 17:46
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.

5 participants