History: PluginList - Hacks and Fun
Source of version: 6
Copy to clipboard
! PluginList - Hacks and Fun A collection of tips, hacks and fun things you can do with ((PluginList)) that don't really belong anywhere else. !! Set the Browser Page Title A client needed a wiki page title (set in the -+<head><title>+- tag) changed from the default page name, and (eventually) we did it like this: {CODE(colors="tiki")}{DIV(class="d-none")}{LIST()} {pagination max="1"} {OUTPUT()}{display name="mytitle" pagetitle="y"}{OUTPUT} {FORMAT(name="mytitle")}This is the page title, not the wiki page title{FORMAT} {LIST}{DIV}{CODE} !! Make a carousel with wikipages You need to create some wikipages and set a category to them. In the example it is the category id 22. LIST will load all pages which contain the category and the carousel will display them. {CODE(theme="default")}{LIST()} {filter type ="wiki page"} {filter categories="22"} {OUTPUT(template="carousel")} {carousel interval="2000" wrap="true" pause="hover" id="mycarousel" } {body field="page" mode="raw"} {OUTPUT} {FORMAT(name="page")} {display format="wikiplugin" name="wikiplugin_include" page="object_id"} {FORMAT} {LIST}{CODE} !! Add links to view page with item details or update form in the Bootstrap modal One needs to add class -+click-modal+- to the links (buttons) leading to service controller to be displayed in the modal. As there is no working Tracker view item action in the Tracker controller we need to create a wiki page first (in this case named "Item Details") to display the requested item details and use the the Wiki action_get_page controller (the Argument variables pref must be enabled for this example to work with -+{~np~{~/np~itemId}}+- arg variable): {CODE()} {LIST()}{pagination max=1}{filter field="tracker_id" exact="1"}{filter field="object_id" exact="{~np~{~/np~itemId}}"}{OUTPUT()} {display default="" name="wikiplugin_img" format="wikiplugin" fileId="tracker_field_myPictures" default="fileId=4"}{OUTPUT}{ALTERNATE()} {ALTERNATE} {LIST} {CODE} Then we just add those two buttons on our listing of items using PluginList: {CODE()} {LIST()} {filter field="tracker_id" exact="1"}{OUTPUT()} ... | <a class="btn btn-primary click-modal" href="tiki-wiki-get_page?page=Item%20Details&itemId={display name="object_id"}&modal=1">View Details</a>{GROUP(groups=Admins)} <a class="btn btn-dark click-modal" href="tiki-tracker-update_item?trackerId=1&itemId={display name="object_id"}&modal=1">Update Item</a>{GROUP}{OUTPUT} {LIST} {CODE} ...add your tips here! ~tc~ (alias(LIST - Hacks and Fun)) ~/tc~