I needed a quick way to set a field value on the server side without going through DataBound forms or anything like that.
Also, I liked the ease of use the 'get_custom_field' function provided, so I wrote something up to do the other side of that function, update a selected record given a masterpage and (when appropriate) page.
Example:
The code above updates a field named 'last_page' on the currently logged in member (using the couch provided members module) with the page name of the current page.
Hope someone else finds this useful and I would love some feedback on anything I might have missed.
Also, I liked the ease of use the 'get_custom_field' function provided, so I wrote something up to do the other side of that function, update a selected record given a masterpage and (when appropriate) page.
Example:
- Code: Select all
<cms:set_custom_field var='last_page' val=k_page_name masterpage='members/index.php' page=k_member_name />
The code above updates a field named 'last_page' on the currently logged in member (using the couch provided members module) with the page name of the current page.
Hope someone else finds this useful and I would love some feedback on anything I might have missed.