Closed drj826 closed 8 years ago
This is actually not a problem. The problem is that I was not writing the template correctly to retrieve the looked up value. Here's an example of how to do it right. Consider the following document. Notice the 'header_left' element:
>>>DOCUMENT.sml-ug title:: Semantic Manuscript Language (SML) subtitle:: User Guide abbreviation:: UG author:: Don Johnson copyright:: 2002-2015, Don Johnson doctype:: book header_left:: [lookup:date:sml-ug] logo_image_small:: files/images/sml_logo.png logo_image_center:: files/images/meadow.jpg version:: v2.0 . . .
The correct way to access the header value in a template is:
[%- IF library.has_property(document_id,'header_left') -%] [%- header_left_element = library.get_first_property_value_element(document_id,'header_left') -%] [% INCLUDE part_list.tt self = header_left_element %] [%- END -%]
When I put a lookup reference in a header or footer element, it does not get resolved. For instance:
should place the date of the SML User Guide document (ID = sml-ug) in the left header. But the lookup reference does not get resolved and
is displayed instead.