by
tim » Sat Sep 26, 2015 10:23 am
My bad, @Goliath. The code above doesn't work. It always shows the super-admin in the author field because that's who was logged in when the template was initiated. But it's the right idea.
To fetch the currently logged in user, we need to make the field accept dynamic data.
- Code: Select all
<cms:editable name="author" type="text" dynamic='default_data'>
author.html
</cms:editable>
In your snippets folder, place a file called "author.html" with the single line:
- Code: Select all
<cms:show k_user_title/>
Now every time the admin panel page is accessed it will look for the snippet and fill the field with that code, in this case showing the author's name.
I hope that helps you.
Tim