.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. include:: ../../../Includes.txt .. _developers_userfunc_session: SessionUserfunc =============== User functions in context with the session management. SetXblogVar ----------- Write any value of an xBlog variable to the session. .. code:: php // Sample: // Write the current value of the URL param tx_blog[pointer] into the session for the tx_blog array with the element 123 // 123 (if uid is 123), mypointer, GP:tx_xblog|pointer // 10 = USER 10 { userFunc = Netzmacher\Xblog\Userfunc\SessionUserfunc->SetXblogVar uid = TEXT uid { field = uid } param = TEXT param { value = mypointer } value = TEXT value { data = GP:tx_xblog|pointer intval = 1 } dontClearCache = 1 } Get the value from above from the session .. code:: php // Sample: // Get the param mypointer from the session from the tx_blog array with the element 123 // data = session: tx_blog|123|mypointer // data { cObject = COA cObject { 10 = TEXT 10 { value = session: tx_xblog| } 20 = TEXT 20 { field = uid } 30 = TEXT 30 { value = |mypointer } } }