Project

General

Profile

Bug #262

Include file doesn't work

Added by Anonymous almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Immediate
Category:
-
Target version:
Start date:
September 18, 2012
Due date:
% Done:

100%

Estimated time:

Description

Error when including file from block, e.g. {include file='intelli:brief-article.tpl'}

History

#1

Updated by Batyr Mackenov almost 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'}

#2

Updated by Vasily Bezruchkin almost 8 years ago

  • Priority changed from High to Immediate
#3

Updated by Vasily Bezruchkin almost 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.

#4

Updated by Vasily Bezruchkin almost 8 years ago

Actually you can also use something like that:

{include file='index.tpl' package='autos'}
#5

Updated by Batyr Mackenov almost 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'}

Also available in: Atom PDF