In a recent question, one answer was to insert a macro for user content. Essentially,
{content-by-user:user.name}
Is there a pronoun that will always resolve to the current user? That is, so each user can see content based on their own username?
Hi Shaun,
you can write a wrapper around this macro.
Create a new user macro, call it e.g. content-by-logged-in-user.
The macro has no body and this template:
## Macro title: content-by-logged-in-user
##
## Developed by: Thomas Schlegel
## @noparams
#set($userkey=$action.getRemoteUser().getKey())
<p>
<ac:structured-macro ac:name="content-by-user" ac:schema-version="1">
<ac:parameter ac:name="">
<ri:user ri:userkey="$userkey"/>
</ac:parameter>
</ac:structured-macro>
</p>
OK. I was hoping for something built in, but I understand. (Wanders off to figure out how to create a macro...)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Creating a user macro is not such a big thing. Maybe my article might help you with that:
This is about creating a user macro for another purpose, but the basics are the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.