Instructions for use
-
Shortcode
The following shortcode command can be inserted into any page, post or widget:[show-tree]displays a tree at the shortcode position. Optional arguments can be included to influence the behaviour of the tree using[show-tree arg1="value1" arg2="value2" ...]
NB: each tree is associated to a style template* – only 1 style template can be used per page or else they will combine into junk. However – you can have as many trees as you want on a page as long as they use the same style template.Usage
The following arguments can be used in the shortcode:[tree_source = "'\a\b\c\d\', 'a\b\b', 'a\c'"]– any list can be passed in filename format[root = "\"]– the start point or subfolder from which to display the tree[style_template = "default"]CSS template* to use. If nothing is specified then the “default” template will used.[icon_home = ""]icons** can be specified as icon names or special characters/html entities using&xx;– see the instruction manual onSpecial Characters[icon_middle = ""][icon_endpoint = ""][style_collapse = "true"]the tree is dynamic so that branches can collapse or expand by clicking the node rather than a fixed view of all branches[source = "page-hierarchy"]is the imported source*** of the path list if not manually specified[endpoint_filter=""]// CSV list of matches to include – spaces count in search in format .png,.jpg,.pdf (.png or .jpg or .pdf)[tree_filter=""]CSV list of matches to include – spaces count in search[hidden_filter = "true"]exclude files or folders starting with “.”[endpoint_link = "true"]enables the endpoint as a hyperlink if one is set, or false to disallow all links[endpoint_image = "true"]displays an image tile if the endpoint is a media file[endpoint_image_size = "30"]size in pixels of a square image tile- You can also use these as POST/GET/REQUEST arguments
NB: * More templates can be uploaded but initially the following are available as standard:
- basic.css
- boxes.css
- cabinet.css
- connected.css
- default.css
- elegant.css
- elegant2.css
- entity.css
- hierarchy.css
NB: ** If the Wolfe Candy Tool Suite is installed then the full icon sets are available to use (and other icon sets are available to download). The following subset is included with this plugin:
- file-cabinet
- go-home-8
- gpicview
- graph
- help-contents-5
- instructions2.jpeg
- link.gif
- mail-attach
- media-player
- newspaper
- notepad
- phone-green
- post-it-note
- question_2
- rating
- reference
- smilie
- user-id
- view-list-tree-4
- word.gif
NB: *** If the Wolfe Candy Tool Suite is installed then more sources are included including S3 buckets. The following subset is included with this plugin:
plugin-folderdisplays the contents of the plugin folder – useful for plugin developersuploads-folderdisplays the contents of the Word Press uploads folderroot-folderdisplays the contents of any path that the system has back-end access to as specified in therootargumentWord Press Developers
The tree can be called using the classWlfC_Treeview. The following are available methods and arguments:- All of the arguments in the Usage section are available e.g.
[style_template="template"]is called as$class->style_template=""; HTML_out = "";– stores the result of theBuildTreemethodstyle_order = "ul";or “ol” for numbered listslug = "";is the plugin nameendpoint_link_pattern = "<a href='[endpoint_url]'>[endpoint_name]</a>";is the pattern to use to create a hyperlink at each endpoint. Other examples are:
endpoint_link_pattern = "<a href='[return_url]'>[endpoint_name]</a>";example to return POST endpoint name to calling page to process using different plugin shortcodeendpoint_link_pattern = "<a href='https://custom.wordpress.url.slug?endpoint=[endpoint_name]'>[endpoint_name]</a>";example to return POST endpoint name to another specified page to process itendpoint_link_pattern = "<a href='[calling_url]?ep=[endpoint_name]&epu=[endpoint_url]'>[endpoint_name]</a>";example to return custom POST args to the calling page
endpoint_integration_call = "";alternative function to call to provide the endpoint_url based on endpoint_name- Method
AddNodeList($nodes)to manually add items to the list - Method
BuildTree()returns the HTML and populatesHTML_out - Method
GetNestedNodes($node)returns a distinct array of all list items that match the$nodeat the next nest_level/sub level - Method
GetIcon($icon, $isize='s')returns the IMG tag HTML for the specified icon (see icon list above) - Method
ImportSource($source)imports the path list from a number of different sources - Method
ListFolder($path)outputs a recursive array of files or folders for a given $pathFeature Backlog
Please email [email protected] if you would like to see these features (or others) included. - Additional icon and template sets
- Max numbers and/or pagination
- Color themes as a sortcode argument using XML templates
- POST/GET support for arguments
- Sort lists
- List page, post or user hierarchy from Word Press database
page-hierarchydisplays the site-map which is a hierarchy of pages that make up theWord Presssite- Build a virtual hierarchy in a database table
- Allow custom endpoint links through .TRV files or database entries
The topic ‘Instructions for use’ is closed to new replies.