Hello,
I’m trying to create a clickable list of blog authors in a sidebar to allow me to show all of an author’s blogs on one page. I’m using TvTagCloud in the sidebar and Ditto on the landing page, both require a Tag TV of blog authors.
How do I create a TV that automatically assigns the value of the TV to that of the blog author? I appreciate I could create an input value of all the authors then manually select the author’s name in the blog resource but this seems a poor way of implementing what I want to achieve.
-
☆ A M B ☆
- 24,524 Posts
You could use @EVAL as the TV’s default value and get the user’s name from the SESSION as the resource is being created.
Otherwise, you’d need a plugin using OnDocFormSave and directly inserting the values into the database.
Thank you for your suggestions Susan as ever. The plugin option is beyond my MODx knowledge at the moment.
When using @EVAL in the default value I found that the value is returned correctly in the document but is not stored in the TV Content Values Link Table. Therefore it cannot be used for TvTagCloud and Ditto tagging.
I’m sure I’ve made a mistake and that it is possible but having spent a couple of days on this I’ve reluctantly decided it will be quicker to create the blog using Wordpress.