move into the context of the visitor (User) |
|
| see user, visitor_node, zena 1.0 | |
Example to show the visitor’s login name:
<r:visitor do='login'/>
You can move further to the visitor’s Contact
node with “node” or “contact” :
<r:visitor do='node' do='mobile'/>
You can also use the shortcut visitor_node to do the same as above:
<r:visitor_node do='mobile'/>
Filtering by current visitor
If you need to filter elements that have been created by the current visitor, here is how you can do this:
nodes where user_id = #{visitor.id} order by created_at desc limit 5