options —
Attribute | Pos. | Req. | Default | Description |
---|---|---|---|---|
code | Yes | Yes | ||
options_type | ||||
admin_page | ||||
routine_description | ||||
admin_page_routine | ||||
display_routine | ||||
interpolate | 0 | interpolate output? | ||
hide | 0 | Hide the tag return value? |
Interchange 5.9.0:
Source: code/SystemTag/options.coretag
Lines: 14
# Copyright 2002-2007 Interchange Development Group and others # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. See the LICENSE file for details. # # $Id: options.coretag,v 1.5 2007-03-30 23:40:49 pajamian Exp $ UserTag options Order code UserTag options addAttr UserTag options PosNumber 1 UserTag options Version $Revision: 1.5 $ UserTag options MapRoutine Vend::Options::tag_options
Source: lib/Vend/Options.pm
Lines: 233
sub tag_options { my ($sku, $opt) = @_; my $item; if(ref $sku) { $item = $sku; $sku = $item->{mv_sku} || $item->{code}; } $item ||= { code => $sku }; $opt = get_option_hash($opt); find_joiner($opt); my $module = find_options_type($item, $opt) or return ''; $opt->{options_type} = $module; #::logDebug("tag_options module=$module"); my $loc = $Vend::Cfg->{Options_repository}{$module} || {}; no strict 'refs'; my $routine; if($opt->{admin_page}) { $opt->{routine_description} ||= "admin page"; $routine = $opt->{admin_page_routine} ||= "Vend::Options::${module}::admin_page"; } else { $opt->{routine_description} ||= "display"; $routine = $opt->{display_routine}; $routine ||= $loc->{display_routine} ||= "Vend::Options::${module}::display_options"; #::logDebug("tag_options display routine=$routine"); } my $sub = \&{"$routine"}; if(! defined $sub) { ::logOnce( "Options type %s %s routine %s not found, aborting options for %s.", $module, $opt->{routine_description}, $routine, $sku, ); return undef; } #::logDebug("main tag_options item=" . ::uneval($item) . ", opt=" . ::uneval($opt)); return $sub->($item, $opt, $loc); }