solved Override page_section_header.tpl

SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Looks like page_section_header.tpl can no longer be overridden by a page_section_header.tpl in the active skin directory.

I'm pretty sure this was working a few months back, but not now. Should that be being overridden, or has something changed with the way this works?

Thanks


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 04/27/14 07:07:57AM
brian
@brian
11 years ago
10,149 posts
It should be called "jrCore_page_section_header.tpl" in your skin directory - that should work. It needs to know what module the template belongs to as well.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Thanks Brian.

I had them all working without jrCore (from memory, the core templates didn't work with the prefix), and from what I looked at this morning, form_field_elements.tpl and others are still being overridden without the jrCore_ prefix. I'll take another look at this later on today, see what is going on with it, and post back here.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
brian
@brian
11 years ago
10,149 posts
Yeah it should require the jrCore_ prefix - not sure how it would work without, but I can check that out.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
It works perfectly when the template is correctly named jrCore_page_section_header.tpl :)

jrCore_ is not being required for most of the core templates though.

I checked with a few other templates, and the ones I tried all work without the jrCore_ prefix to the template name as well (ie they continue overriding the core if I rename them to jrCore_*.tpl)

form_field_elements.tpl
page_tool_entry.tpl
page_tab_bar.tpl
page_table_row.tpl
page_banner.tpl


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 03/24/14 09:12:00AM
michael
@michael
11 years ago
7,802 posts
That would be a left-over then.

In the beginning select templates were allowed to be over-ridden. The way it was done was in each location where the template was about to be called, there was an if/else check to see whether a template of the same name was in the active skin directory.

Then that if/else check got moved into the template parser function so modules didnt need to specifically go look for it. (just in case some module developer forgot to include that if/else and made it impossible to override. :( )

So what your seeing is some left-over code that allows you to use the same name.

Safer to use the correct over-ride naming convention.

One other example is 'admin.tpl' is still being looked for currently. Its extra code that might go away in future. So 'jrCore_admin.tpl' is safer.
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Thanks Michael,

I'll use the jrCore_ prefix.

It is admin.tpl as well, and as far as I know all other jrCore templates apart from page_section_header - I haven't checked them all recently, but I had the full set being overridden this way a few months back.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
brian
@brian
11 years ago
10,149 posts
Yeah this is probably a hold over from an earlier way of how it was done - just go with the jrCore_ naming convention and it will always work going forward.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags