Skip to content

Commit

Permalink
Item14005: Add templattopic to the email template parameters
Browse files Browse the repository at this point in the history
Doesn't actually change any templates,  just make the parameter
available for conditional use in the templats.
  • Loading branch information
gac410 committed Mar 4, 2016
1 parent f040cb1 commit 36c5666
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TopicUserMappingContrib/data/System/ManagingUsers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,11 @@ Content-Transfer-Encoding: 8bit
WIKINAME="%WIKINAME%"
FIRSTLASTNAME="%FIRSTLASTNAME%"
EMAILADDRESS="%EMAILADDRESS%"
TEMPLATETOPIC="%TEMPLATETOPIC%"
}%
</verbatim>
<div class="foswikiHelp"> %H% *Note* the use of %<nop>WIKINAME%, %<nop>FIRSTLASTNAME%, %<nop>EMAILADDRESS% passed in from the INCLUDE so that the topic below is similar to the original template</div>
<div class="foswikiHelp"> %H% *Note* the use of %<nop>WIKINAME%, %<nop>FIRSTLASTNAME%, %<nop>EMAILADDRESS%, passed in from the INCLUDE so that the topic below is similar to the original template.
The %<nop>TEMPLATETOPIC% variable is also available. It could be used as a "section" name in the include, or directly in the email for tailoring messages for specific types of users.</div>

and then create a topic %NOP%%USERSWEB%.RegisterNotifyEmail:
<verbatim class="tml">
Expand Down
1 change: 1 addition & 0 deletions core/lib/Foswiki/UI/Register.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,7 @@ sub _buildConfirmationEmail {
$templateText =~ s/%FIRSTLASTNAME%/$data->{Name}/g;
$templateText =~ s/%WIKINAME%/$data->{WikiName}/g;
$templateText =~ s/%EMAILADDRESS%/$data->{Email}/g;
$templateText =~ s/%TEMPLATETOPIC%/$data->{templatetopic}/g;

my $topicObject = Foswiki::Meta->new( $session, $Foswiki::cfg{UsersWebName},
$data->{WikiName} );
Expand Down

0 comments on commit 36c5666

Please sign in to comment.