.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. include:: ../../../../Includes.txt .. _administrators_bestpractise_userfunc_session: Session ======= You don't need a single view, you don't need a Browser plugin, to write the uid of a given table to the session. This is usefull, if you aren't displaying your data by records, but linked from it to an internal page. Setup ----- Write an uid of a defined table to the session. .. code:: php page = PAGE page { // set uid 201 for tx_quickshop_provider 2021 = USER 2021 { userFunc = Netzmacher\Browser\Plugins\UserFunc\Session->setShowUid table = tx_quickshop_provider uid = 201 } // set the uid while runtime by an URL parameter 2202 = COA 2202 { // if.isTrue.data = register:tx_org_cal__uid if = if { isTrue = isTrue { data = GP:tx_browser_pi1|calUid intval = 1 } } 10 = USER_INT 10 { userFunc = Netzmacher\Browser\UserFunc\Session->setShowUid table = tx_org_cal uid = TEXT uid { data = GP:tx_browser_pi1|calUid intval = 1 } dontClearCache = 0 } } } Parameter ''''''''' .. list-table:: Parameter :header-rows: 1 :widths: 10 50 20 * - Parameter - Description - Property * - table - label of the table in the database - Content Object like TEXT, COA, ... * - uid - uid of the record - Content Object like TEXT, COA, ... * - dontClearCache - Enable it, if you like to truncate the tables cf_cache_pages and cf_cache_pagesection - Content Object like TEXT, COA, ... Get last uid ------------ If you want to know, how to get the uid of the last selected record from the browser session, please refer to: :ref:`Administrators > Best Practise > Session > Last Uid `