Skip to content

Commit

Permalink
Item13932: ExpandTopicContentPlugin encode parameter wrongly document…
Browse files Browse the repository at this point in the history
…ed - hide not hidden
  • Loading branch information
KennethLavrsen committed Jan 22, 2016
1 parent b730c60 commit e67f121
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion data/System/ExpandTopicContentPlugin.txt
Expand Up @@ -30,11 +30,12 @@ This plugin also implements the Macro REVISIONATTIME which is useful to enable l
---++ Info

| Author(s): | Foswiki:Main.KennethLavrsen |
| Copyright: | © 2010-2014 Kenneth Lavrsen |
| Copyright: | © 2010-2016 Kenneth Lavrsen |
| License: | [[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]] |
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 22 Jan 2016 (1.2) | Fixed the documentation for EXPANDTOPIC (hide, not hidden) |
| 30 Jul 2014 (1.1) | Added the REVISIONATTIME macro which is useful link to earlier revisions of a topic based on a date |
| 09 Dec 2010 (1.0) | Initial release |
| Dependencies: | %$DEPENDENCIES% |
Expand Down
4 changes: 2 additions & 2 deletions data/System/VarEXPANDTOPIC.txt
@@ -1,12 +1,12 @@
#VarEXPANDTOPIC
---+++ EXPANDTOPIC{"topic" expand="..." encode="..."} -- include an entire topic with macros expanded
* Returns the topic text from a topic and expands macros as given by parameters. Result can be encoded or hidden.
* Syntax: =%<nop>EXPANDTOPIC{"topic" expand="all|create|none" encode="none|hidden|entity"}%=
* Syntax: =%<nop>EXPANDTOPIC{"topic" expand="all|create|none" encode="none|hide|entity"}%=
* Supported parameters:
| *Parameter:* | *Description:* | *Default:* |
| "topic" | The topic that is expanded. It can be prefixed by the web name in which case the web parameter is ignorred | Current topic |
| web="webname" | The web of the topic to be expanded. | Current web |
| expand | expand="all" - all macros are expanded in the scope of the expanded topic. <br /> expand="create" - all macros inside sections of type 'expandvariables' are expanded the same way, and according to the same rules as when a template topic is expanded when creating a new topic <br /> expand="none" - no macros are expanded (they will be later in the context of the parent topic unless encoded). | "all" |
| encode | encode="none" - no encoding is done <br /> encode="entity" - the entire expanded topic is entity encoded so it can be contained inside a hidden html text field. <br /> encode="hidden" - the EXPANDTOPIC returns nothing. This can be quite useful if the expanded topic contains Macros from plugins that either performs an action or defines macros that are accessible from the parent topic | "none" |
| encode | encode="none" - no encoding is done <br /> encode="entity" - the entire expanded topic is entity encoded so it can be contained inside a hidden html text field. <br /> encode="hide" - the EXPANDTOPIC returns nothing. This can be quite useful if the expanded topic contains Macros from plugins that either performs an action or defines macros that are accessible from the parent topic | "none" |
* Note: Defined preferences in the expanded topic are not defined in the including parent topic. Preferences defined in the parent are however valid in the expanded topic.
* Example: %<nop>EXPANDTOPIC{"TemplateTestTemplate" encode="entity" expand="create"}%
8 changes: 4 additions & 4 deletions lib/Foswiki/Plugins/ExpandTopicContentPlugin.pm
Expand Up @@ -20,7 +20,7 @@ The following is done to the expanded topic.
expanded topic.
* If the parameter encode is set to 'entity' the entire expanded topic is
entity encoded so it can be contained inside a hidden html text field.
* If the parameter encode is set to 'hidden' the EXPANDTOPIC returns nothing.
* If the parameter encode is set to 'hide' the EXPANDTOPIC returns nothing.
This can be quite useful if the expanded topic contains Macros from
plugins that either performs an action or defines macros that are
accessible from the parent topic
Expand All @@ -33,7 +33,7 @@ The applications for this plugin are
other macros. This is done by making a creator topic that contains
an HTML form that targets the base line topic and contains a hidden
input field with .. <input type="hidden" name="text"
value="%EXPANDTOPIC{"TemplateTopic" encode="entiry"}% />
value="%EXPANDTOPIC{"TemplateTopic" encode="entity"}% />
* INCLUDE a topic without actually including the content in the rendered
output but take advantage of the actions a plugin takes on the included
topic. An example can be to include a schedule created by TimeCalcPlugin
Expand All @@ -55,8 +55,8 @@ use Foswiki::Time (); # Time API

# $VERSION is referred to by Foswiki, and is the only global variable that
# *must* exist in this package.
our $VERSION = '1.1'; # Do not change this
our $RELEASE = '1.1'; # Change this. Keep it in X.Y format
our $VERSION = '1.2'; # Do not change this
our $RELEASE = '1.2'; # Change this. Keep it in X.Y format
our $SHORTDESCRIPTION = 'Expands all macros and expandvariables type sections of a topic and return the raw markup';
our $NO_PREFS_IN_TOPIC = 1;

Expand Down

0 comments on commit e67f121

Please sign in to comment.