wpart_lookup_unbreak

since: 1.4.1

wpart_lookup_unbreak grants access to previously set variables inside a view. It only works for strings, and takes care not to double-encode UTF-8 data.

Variables should be prepared by calling wpart:fset function.

See also: wpart_lookup

Attributes

key

Specifies the key which the value should be fetched from.

Example

controller.erl

  ...
  print_translations() ->
      Golab = [103,111,197,130,196,133,98], % utf8-encoded string "gołąb"
      wpart:fset("pl", Golab),
      {template, "templates/pigeon.html"}.
  ...

pigeon.html

  ...
  They should use the word <i><wpart:lookup_unbreak key="pl" /></i> in Kraków Office more often.
  ...

Wparts/WpartLookupUnbreak (last edited 2010-06-15 17:38:55 by KrzysztofGoj)