Let front controllers access "all" for template files

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Let front controllers access "all" for template files

Post by VSE » Sat Dec 21, 2013 9:00 am

Extension front controllers can only look for template files in "prosilver", "subsilver2" but oddly, not in "all"

I'm talking here about when we use helper->render('my_template.html')

They should look in "all" for my_template.html', but they do not, they look in prosilver instead..

But this also brings up a question i need clarification on: When "all" is not used, what happens if a board has other 3rd party styles? Are extension template files inherited from its prosilver folders only when the style is built using template inheritance? And if so do we have to create template files for every single 3rd party style that does not do template inheritance?
Last edited by MichaelC on Sat Dec 21, 2013 7:48 pm, edited 1 time in total.
Reason: Remove [RFC] from title
Has an irascible disposition.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Let front controllers access "all" for template files

Post by imkingdavid » Sat Dec 21, 2013 7:33 pm

Regarding your last paragraph, yes it should pull from prosilver as long as it is a parent style of the 3rd party style. The vast majority of 3rd party styles should inherit from either subsilver2 or prosilver, and It is not the extension author's responsibility to provide template files for those that don't (that would be impractical).

As for using 'all' as the last fallback for the inheritance tree, like it is for events, I can support that, but I'm not sure what the rationale was originally when we decided not to make it do that in the first place.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Let front controllers access "all" for template files

Post by EXreaction » Sun Dec 22, 2013 5:15 am

Basically this would consist of us making a new directory, styles/all/, and force all styles to inherit from this at the root level.

User avatar
Darkness_demoN
Registered User
Posts: 89
Joined: Mon Jul 29, 2013 1:48 pm
Contact:

Re: Let front controllers access "all" for template files

Post by Darkness_demoN » Mon Dec 23, 2013 3:48 am

EXreaction wrote:Basically this would consist of us making a new directory, styles/all/, and force all styles to inherit from this at the root level.
+1

Post Reply