zoukankan      html  css  js  c++  java
  • [eZ publish] fetch_alias() and fetch()

    When going through the manual, we can know that, fetch_alias() can be thought of as a configuration-file based version of the fetch() operator.

    But the fetch_alias() must be defined in configuration override for "fetchalias.ini", 

    代码
    [fetch_alias_name]
    Module
    =module_name
    FunctionName
    =function_name
    Parameter
    [parameter1]=fetch_alias_name1
    Parameter
    [parameter2]=fetch_alias_name2
    ...
    Constant
    [parameter3]=<any value>
    Constant
    [parameter4]=<any value>
    ...

    Directive

    Description

    Module

    The name of the target module (for example "content").

    FunctionName

    The name of the target fetch function (for example "list").

    Parameter

    The "Parameters" array may be used to specify variables that will beset in the template(s). The "parameter_name" maps to the parameter nameused in normal fetch functions. The "fetch_alias_name" will be theparameter name used in the template(s).

    Constant

    Parameters that are defined as constants within the regular fetch function(s).

    For example:

    Configuration block:

    [object]
    Module
    =content
    FunctionName
    =object
    Parameter
    [object_id]=id
    Template code:

    {def $object=fetch_alias( 'object', hash( 'id', 1 ) )}
    We can consider it Template code to be as follow:

    代码
    {def $object = fetch(
    "content",
    "object",
    hash(
    "object_id", 1
    )
    )
    }

    More details, please click to view: http://ez.no/doc/ez_publish/technical_manual/4_x/reference/template_functions/miscellaneous/fetch_alias

  • 相关阅读:
    unity3D打造skybox淡入淡出
    FastGUI for NGUI教程
    (转)oracle的split函数
    (转)oracle嵌套表示例
    (转)pipe row的用法, Oracle split 函数写法.
    (转)Oracle 包(Package)
    (转)Oracle存储过程中的事务
    distinct与order by
    Oracle存储过程使用总结
    (转)Oracle中动态SQL详解
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/1727838.html
Copyright © 2011-2022 走看看