Bug #262

Include file doesn't work
100%
Description
Error when including file from block, e.g. {include file='intelli:brief-article.tpl'}
History
Updated by Batyr Mackenov over 8 years ago
- Status changed from New to Feedback
The request to brief-article.tpl is specific to package.
This statement will work properly for a regular template file.
There currently no way to request package specific template files due to code architecture (usage of IA_CURRENT_PACKAGE global constant). It affects the code where the currently active package could not be determined.
It could be temporarily resolved via following statement:{include file=$smarty.const.IA_HOME|cat:'packages/publishing/templates/common/brief-article.tpl'}
Updated by Vasily Bezruchkin over 8 years ago
There might be a need to use package file from template, that's specific for the package. In this case the template should be taken from the template folder, not from the core. Also we need to implement a quick easy way to include package template file. Something like:
{include file='PACKAGE_NAME:brief-article.tpl'}
where package name is the name of the package. The software should check for files in used template folder and then if the file does not exist take it from the package.
Updated by Vasily Bezruchkin over 8 years ago
Actually you can also use something like that:
{include file='index.tpl' package='autos'}
Updated by Batyr Mackenov over 8 years ago
- Status changed from Feedback to Resolved
- % Done changed from 0 to 100
Implemented. Committed under revision #2881.
The following syntax should be used:
{include file='PACKAGE_NAME:brief-article.tpl'}
Note: PACKAGE_NAME is lowercase, example
{include file='publishing:brief-article.tpl'}