Allow the Account system to return data (JSON/XML/other) without style and layout templates.
This commit is contained in:
parent
9fdac9ef8f
commit
caa511bee5
2 changed files with 21 additions and 1 deletions
|
|
@ -23,7 +23,8 @@
|
|||
- Survey editor now keeps survey objects in a scrollable panel to keep buttons always in view.
|
||||
- fixed #10198: Cannot drag assets to new positions on page
|
||||
- fixed #10190: Matrix 2.0 - Strange characters in "Show Ratings" box
|
||||
- rfe: #10002: User Manager, view User's Account
|
||||
- rfe: #10002: User Manager, view User's Profile (perlDreamer Consulting)
|
||||
- rfe: #10073: Account system to be able to return XML/JSON (perlDreamer Consulting)
|
||||
|
||||
7.7.3
|
||||
- fixed #10094: double explanation in thread help
|
||||
|
|
|
|||
|
|
@ -75,6 +75,22 @@ public uid => my %uid;
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 bare ( [ flag ] )
|
||||
|
||||
Returns whether or not the Account system should return a method's content
|
||||
without the layout and style templates. This would normally be used for
|
||||
returning JSON or XML data out of the account system.
|
||||
|
||||
=head3 flag
|
||||
|
||||
Optionally set bare to be true, or false.
|
||||
|
||||
=cut
|
||||
|
||||
public bare => my %bare;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 store ( [ hashRef ] )
|
||||
|
||||
Returns a hash reference attached to this account object that contains arbitrary data.
|
||||
|
|
@ -192,6 +208,9 @@ sub displayContent {
|
|||
my $noStyle = shift;
|
||||
my $session = $self->session;
|
||||
|
||||
##Don't do any templating if we're sending back data like JSON or XML.
|
||||
return $content if $self->bare;
|
||||
|
||||
#Wrap content into the layout
|
||||
my $var = {};
|
||||
$var->{content} = $content;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue