From 876277bbf87fe4eef6d2499cf22addff42e25856 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 18 Apr 2012 14:51:59 -0400 Subject: [PATCH] slide for context data Signed-off-by: Bill Erickson --- eg2012_tpac.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/eg2012_tpac.txt b/eg2012_tpac.txt index 68477f952..3efade7b3 100644 --- a/eg2012_tpac.txt +++ b/eg2012_tpac.txt @@ -255,6 +255,25 @@ Skinning and Localization with Apache Virtual Hosts ------------------------------------------------------------------------------ +Context Data +------------ + + * Most of the data is pre-fetched by the page handlers within the EGCatLoader + class and inserted into a global hash called "ctx". + * 3 generic classes of data retrieval functions are passed into the template + environment. For each, replace HINT with the class hint of the desired object. + ** ctx.get_HINT + *** inherited_vis = ctx.get_cgf('opac.org_unit.non_inheritied_visibility').enabled == 'f'; + ** ctx.search_HINT + *** item_langs = ctx.search_ccvm('ctype', 'item_lang'); + ** ctx.HINT_list + *** copy_status_list = ctx.ccs_list; + * ctx.aou_tree provides the canonical org unit tree + * ctx.aouct_tree provides the OPAC custom org unit tree (when present) + * ctx.get_org_setting(org_id, setting_name) + ** Returns the org unit setting value + * ctx.parse_datetime(ISO_date) + ** Returns a date compatible with the Template Toolkit DATE plugin. Debugging TPAC -------------- -- 2.11.0