From f7b01f5aebc4e1ebc5068e773ee1c188f8205a90 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 6 Mar 2007 00:36:18 +0000 Subject: [PATCH] Add the ability to mark documentation as private, so users don't get confused as to which template variables to use. Tested this with the Article, now all the others just have to be marked as well. --- lib/WebGUI/Help/Asset_Article.pm | 1 + lib/WebGUI/Operation/Help.pm | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/WebGUI/Help/Asset_Article.pm b/lib/WebGUI/Help/Asset_Article.pm index e0f754aab..d5bf5916a 100644 --- a/lib/WebGUI/Help/Asset_Article.pm +++ b/lib/WebGUI/Help/Asset_Article.pm @@ -158,6 +158,7 @@ our $HELP = { }, 'article asset template variables' => { + private => 1, title => 'article asset template variables title', body => 'article asset template variables body', isa => [ diff --git a/lib/WebGUI/Operation/Help.pm b/lib/WebGUI/Operation/Help.pm index cc8db4962..45dacf655 100644 --- a/lib/WebGUI/Operation/Help.pm +++ b/lib/WebGUI/Operation/Help.pm @@ -387,6 +387,7 @@ sub www_viewHelpIndex { my $namespace = $fileSet->[1]; my $help = _load($session,$namespace); foreach my $key (keys %{$help}) { + next if $help->{$key}{private}; push @helpIndex, [$namespace, $key, $i18n->get($help->{$key}{title},$namespace)]; $i++; @@ -505,6 +506,7 @@ sub www_viewHelpChapter { my $output = ''; my $i18n = WebGUI::International->new($session); foreach my $id (@entries) { + next if $help->{$id}{private}; $output .= '

'.$i18n->get($help->{$id}{title},$namespace).'

'; } my $ac = WebGUI::AdminConsole->new($session,"help");