Giter VIP home page Giter VIP logo

rememberthis's Introduction

#RememberThis

Remember list for MODX Revolution.

##Features

RememberThis is small session based remembering snippet solution for MODX Revolution. It displays the session based list and a link to add elements to the list.

The data added to the list could be retreived from MODX resources or from xPDO packages. If the added data is retreived from xPDO package, the row is referenced by the primary key of the class.

Adding and removing elements from the list could be made by url params or by AJAX. A jQuery AJAX script is used by default.

##Installation

MODX Package Management

##Usage

Most of the snippet template settings should be made in the MODX system settings and are used in snippet and ajax mode.

The package contains two snippets and a formit hook, that use the following parameters:

###RememberThisAdd

Display the add button.

Property Description Default
addTpl Template for the add link. tplRememberThisAdd
addId This value (and the correspondenting item title) is added to the list. Current resource id

###RememberThisList

Display the list with this snippet.

Property Description Default
rowTpl Row template for the list output. tplRememberThisRow
outerTpl Outer template for the list output, if the list is not empty. tplRememberThisOuter
noResultsTpl Template that is displayed, if the list is empty. tplRememberThisNoResults
scriptTpl Template for the javascript call. tplRememberThisScript
jsonList Output a JSON encoded list of element keyname values. no

###RememberThis (FormIt hook)

The Formit placeholder rememberthis will be filled with the content of the list.

Property Description Default
rememberRowTpl Row template for the list output. tplRememberThisRow
rememberOuterTpl Outer template for the list output, if the list is not empty. tplRememberThisOuter
jsonList Fill the formit placeholder rememberthis with a JSON encoded list of element keyname values. no
clearList Clear the list after running the hook. no

###System Settings

All the system settings are prefixed by rememberthis..

Property Description Default
rowTpl Row template for the list output. tplRememberThisRow
outerTpl Outer template for the list output, if the list is not empty. tplRememberThisOuter
addTpl Template for the add link. tplRememberThisAdd
noResultsTpl Template that is displayed, if the list is empty. tplRememberThisNoResults
showZeroCount Show Zero Values in template. yes
itemTitleTpl Template for one list item. tplRememberThisItemTitle
ajaxLoaderImg Image file, that is shown during AJAX requests. FontAwesome fa-refresh
tvPrefix Prefix for template variables in template chunks. tv.
addQuery Query key, used to add elements to the list. add
deleteQuery Query key, used to remove elements from the list. delete
language Snippet language. en
packagename xPDO package name where the added data is retreived from. If empty, the data is retrieved from resources. The data row is selected by the id column of the package or modResource. -
classname xPDO class name where the added data is retreived from. -
joins Joins defined in the xPDO class, to retreive the added data. -
jQueryPath Path to jQuery script. -
includeScripts Include javascripts (at the end of the body). yes
includeCss Include css (at the end of the head). yes
debug Display debug informations. no

The following templating system settings could be overridden in the snippet calls: rowTpl, outerTpl, addTpl, noResultsTpl

In template chunks all resource fields of the MODX resources could be used as placeholder including template variables with the prefix 'tv.' could be used. If a xPDO package is used, all fields of this package could be used as placeholder.

rememberthis's People

Contributors

jako avatar

Watchers

Ilya Utkin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.