Project

General

Profile

Bug #7506

default_template setting seems not to considered because includes load default

Added by Yannick Warnier over 4 years ago. Updated over 4 years ago.

Status:
Bug resolved
Priority:
Normal
Category:
Styles, Layout & Accessibility
Target version:
Start date:
03/02/2015
Due date:
% Done:

100%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

When copying the default template to an alternative folder to use a new template, it is important to note that many files have includes and extends statements which will (by default) load the "default/" directory (which could make one think that the alternative template is not loaded correctly, more so if locally the new template was developed as a modification to the "default" folder rather than the alternative folder).

This could be easily solutioned by making the includes and extends call a variable path, where the first part of the variable is the name of the template/folder.

This is done with calls like:

{% extends template ~ "/layout/layout_2_col.tpl" %}

where "template" is actually a variable (assigned with the $tpl->assign('template', ...) call in template.lib.php) and the "~" symbol is for concatenation.

Associated revisions

Revision 8eb022a5 (diff)
Added by Yannick Warnier over 4 years ago

Twig templates: Fix path to other elements in default template so that a copy uses local resources by default - refs #7506

History

#1

Updated by Yannick Warnier over 4 years ago

  • Subject changed from default_template setting not taken into account to default_template setting seems not to considered because includes load default
  • Description updated (diff)
  • Status changed from Assigned to Feature implemented
  • % Done changed from 0 to 100

Fixed in commit 8eb022a526ce2b30dbf8f5d1d7e2d68880801205 for default template

#2

Updated by Yannick Warnier over 4 years ago

  • Status changed from Feature implemented to Bug resolved

Also available in: Atom PDF