-
Notifications
You must be signed in to change notification settings - Fork 325
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
Default template based on the template of the parent page #4922
Comments
That sounds interesting. Can you maybe add an example how this configuration would look like in your opinion? |
Note the
Note the childViews, it has a param |
I think we would rather name that tag @sulu/core-team WDYT? Is that something we should support? How would you name that XML node? |
@danrot Fair point, childTemplates would be a better name for it. |
I have discussed with @chirimoya, @alexander-schranz and @nnatter, and we've decided that this setting would make more sense in the webspace xml, because then you have all default templates at the same place. We imagined it to look something like this: <?xml version="1.0" encoding="utf-8"?>
<webspace xmlns="http://schemas.sulu.io/webspace/webspace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.sulu.io/webspace/webspace http://schemas.sulu.io/webspace/webspace-1.1.xsd">
<name>Example</name>
<key>example</key>
<default-templates>
<default-template type="page" parent-template="team">member</default-template>
</default-templates>
</webspace> However, it would be very important that existing installations don't break because of that change (that might not be a problem of the XML, but of the representation of the XML in PHP). |
The other thing you have mentioned (restricting the child templates) is actually the same issue as #913. However, we have shortly discussed that, and concluded that introducing a feature like this would complicate a lot of things. Also see my comment on the other issue. And I would not worry that these two features get in the way of each other, since I would see this kind of preferred templates in the template XML anyway. |
Actual Behavior
When creating a new child-page, the template that's chosen by default almost never corresponds with the one you'll be using.
Expected Behavior
Having the option to define in your parent template what the default template should be for your new child page.
Steps to Reproduce
F.e. you have the artists page on the demo, if you add a page underneath it will most likely only be of type artist.
Possible Solutions
In a template, have an option to specify the child template. That template will then be used when creating a child on that page.
The text was updated successfully, but these errors were encountered: