Menu

#88 core:include and TMPL_IMPORT (multilang)

open
nobody
2
2004-10-26
2004-10-26
No

Back from the beyond ;) Been messing around with a
changing DocuWiki into something more WACT shaped,
which leads into having to do something interesting
with the multilang filescheme.

Part of the localization of the UI involves being able
to embed snippets of HTML - something it little more
than the varfile format and core:import are really
suitable for.

Anyway - hacked the core:include tag (see attached
patch) to allow an import attibute in the include tag,
which corresponds to the TMPL_IMPORT constant for the
multilang filescheme.

If the general idea looks good, will do the tests and
commit.

Discussion

  • Harry Fuecks

    Harry Fuecks - 2004-10-26

    Unified diff (3 lines context) for framework/template/tags/core/include.tag.php

     
  • Jeff Moore

    Jeff Moore - 2004-11-12

    Logged In: YES
    user_id=31876

    I don't think that the import tag is the right place for this. I think this
    illustrates a limitation in the multilangl filescheme:

    case TMPL_INCLUDE:
    $filename = $fileroot . '/templates' . $file;
    break;
    case TMPL_IMPORT:
    $filename = $fileroot . '/lang/' .
    $GLOBALS['CurrentLanguage'] . $file;
    break;

    so imports are allowed to vary by language, but includes are not. Rather
    than change the include operation to pretend to be a import operation, it
    would probably be better to modify the multilang filescheme to allow
    templates to vary by language.

     

Log in to post a comment.

MongoDB Logo MongoDB