Project

General

Profile

Actions

Bug #1820

closed

WTemplate, block() function, lacking documentation

Added by Boris Nagaev over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
High
Assignee:
Michael Vilsker
Target version:
Start date:
04/07/2013
Due date:
% Done:

0%

Estimated time:

Description

Hello!

This template text does not work (produces empty output):

<message id="KeyValue">
     ${tr:{1}}: ${{1}}
</message>

<message id="x.y.template.z">
    ${block:KeyValue x.a.obj.Name}
    ${block:KeyValue x.a.Description}
</message>

While this does work:

<message id="KeyValue">
     ${tr:{1}}: ${{1}}
</message>

<message id="x.y.template.z">
    ${block:KeyValue x_a_obj_Name}
    ${block:KeyValue x_a_Description}
</message>

('.' was replaced with '_' in arguments of block).

As well as this:

<message id="KeyValue">
     ${tr:{1}}: ${{1}}
</message>

<message id="x.y.template.z">
    ${block:KeyValue 'x.a.obj.Name'}
    ${block:KeyValue 'x.a.Description'}
</message>

It seems to be connected with argument parsing function parseArgs():

https://github.com/kdeforche/wt/blob/11eac89281216ad26e/src/Wt/WTemplate.C#L556

https://github.com/kdeforche/wt/blob/11eac89281216ad26e/src/Wt/WTemplate.C#L581

At L556, only '' is allowed, at L581 '' and '-', but not '.'

Allowed characters are not listed in description of WTemplate.

Actions #1

Updated by Koen Deforche over 11 years ago

  • Status changed from New to InProgress
  • Assignee set to Michael Vilsker
  • Target version set to 3.3.1

Michael,

Can you see what's wrong and possibly improve the documentation ?

Koen

Actions #2

Updated by Koen Deforche over 11 years ago

  • Priority changed from Low to High
Actions #3

Updated by Michael Vilsker over 11 years ago

  • Status changed from InProgress to Resolved
Actions #4

Updated by Koen Deforche about 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF