Introduction
In phpBB 3.0.6 a new feature was added: template inheritance. It allows basic creation of child styles that include only modified template files. For example, if style author has modified only header/footer, template includes only overall_header.html and overall_footer.html
Many style authors are not aware of this function, making it harder for themselves to maintain styles. This also makes validation of styles a bit harder.
Proposal
Add template inheritance to prosilver and subsilver2, pointing to itself. During template installation, if template is pointing to itself for inheritance, ignore inheritance field.
Pros
When designers will create new styles, they will become aware of template inheritance and will automatically use it.
If designer does not want to use template inheritance, he can remove variable or point it to itself.
Cons
I don't see any
Notes
This RFC doesn't add any new features and won't break anything, so it can be implemented for 3.0.11
Implementation
Ticket: http://tracker.phpbb.com/browse/PHPBB3-10616
Pull request: https://github.com/phpbb/phpbb3/pull/549
[RFC|Merged] Enable template inheritance by default
- Mighty Gorgon
- Registered User
- Posts: 14
- Joined: Wed Sep 17, 2003 8:52 am
- Location: Italy
- Contact:
Re: [RFC] Enable template inheritance by default
Sounds like a great idea.
*Imagine a signature super spectacular.*
Re: [RFC] Enable template inheritance by default
(18:21:56) cyberalien: I have a question about RFC process. Styles team had a meeting today, as a result I'll be posting bunch of styles related RFCs on area51. Problem is, those RFCs require each other in order to be implemented. Should I post them as one huge (really huge) RFC or post them as separate RFCs pointing to each other?
(18:22:36) cyberalien: I think separate RFCs would make discussion easier
(18:22:43) A_Jelly_Donut: pointing to each other AFAIK
(18:22:50) A_Jelly_Donut: err, many pointing to each other
(18:23:46) cyberalien: its like this: rfc#1 is small base rfc, rfc#2 requires #1 to be implemented, rfc#3 requires #1 and #2, rfc#4 requires #1-#3
(18:23:54) cyberalien: so like a chain of rfcs
(18:25:32) A_Jelly_Donut: yeah. just include a "depends on" section in each post with links
(18:25:37) cyberalien: ok
(18:50:24) igorw: yes, having them as separate RFCs definitely makes sense
(18:50:35) cyberalien: ok
(18:50:53) igorw: I'm quite curious to see them
(18:51:15) cyberalien: posted first two, working on others
(18:52:12) cyberalien: #1 is adding template inheritance by default, #2 is merge of style compoments, #3 is revamp of styles section in acp, #4 is cleaning up prosilver code. #3 reqiures #2
(18:52:53) igorw: ok, the dependencies aren't so chained after all
(18:52:55) igorw: and that's good
(18:53:17) cyberalien: and #1 can be implemented in 3.0.11, so it won't be a problem ether
(18:54:32) igorw: so looking at #1, and sorry to pester you already, this would just be adding the inherit line to the cfg file?
(18:54:49) cyberalien: yep and changing style installation a bit
(18:55:12) cyberalien: so a minor patch, only few lines of code to change
(18:55:21) cyberalien: others will be huge though
(18:56:13) igorw: sounds mostly like a documentation issue to me, as technically speaking there will not be much difference
(18:56:26) igorw: but if it helps, I'm not against adding it
(18:56:35) cyberalien: it will help, a lot
(18:57:20) igorw: I have tried to push the styles team towards promoting template inheritance in the past
(18:57:44) igorw: getting more of that is absolutely desirable
(18:59:44) cyberalien: i really like vbulletin way of handling inheritance: big tree of styles. want to edit one template? create a child style, edit that item. want to create many styles with that edit? create more child styles of that style. i do hope to see something like that in phpbb 4.0
(19:00:19) cyberalien: but its too early for that
(19:01:17) igorw: twig blocks and inheritance are definitely powerful features
(19:01:39) cyberalien: yep, very powerful
Re: [RFC] Enable template inheritance by default
Seems reasonable to me.
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: [RFC] Enable template inheritance by default
I agree as well.
Re: [RFC] Enable template inheritance by default
+1
Somebody want to work on a patch for this?
Somebody want to work on a patch for this?
Re: [RFC] Enable template inheritance by default
Two patch will be needed:Arty wrote:This RFC doesn't add any new features and won't break anything, so it can be implemented for 3.0.11
- 3.x: compatible with [RFC] Merge style components
- 3.0.x: for
template.cfg
Styles Team probably will work on that.naderman wrote:Somebody want to work on a patch for this?