About this plugin
Dealers and Branches (DnB) coded for whom may need a list of own dealers or branches of any kind of bussiness.
How to create shortcode?
Parts of ShortCode
Name: dnb_list (static name, not changable)
title: any title you want
tableCaptions: table captions (columns) and other properties of columns
Sample ShortCode
[ dnb_list title="Title of Table" tableCaptions=" {'thWidthPercentage':20,'arrayNumbersOfFields':'1','columnCaption':'Caption of Column','isSortable':true,'sortTypeDefaultIs_Asc':true}, {'thWidthPercentage':20,'arrayNumbersOfFields':'1','columnCaption':'Caption of Column','isSortable':true,'sortTypeDefaultIs_Asc':false}, {'thWidthPercentage':10,'arrayNumbersOfFields':'2','columnCaption':'Caption of Column','isSortable':true,'sortTypeDefaultIs_Asc':true}, {'thWidthPercentage':50,'arrayNumbersOfFields':'9,1,3','columnCaption':'Caption of Column','isSortable':true,'sortTypeDefaultIs_Asc':true} " jsVars="{'recordsPerpage':5, 'pagingPosition':'A'}" searchTitle="Search" searchOnlyIn="1,2,3,9" filteringTitle="Filtered By:" filteringArrayNumberOfField=10 ]<h3>Elements of a ShortCode</h3>dnb_list: name of short code and you can not change it
tableCaptions: every parameters and arguments setting in this element. Every object in tableCaptions are represents a column.
Inside the column object you can adjust
* thWidthPercentage (width of solumn),
* arrayNumbersOfFields (choose the related database tables column from the list of $arrayOfFields section below,
* columnCaption (caption of the column of table,
* isSortable (if column captions click sorts fields ascendens or descendens),
* sortTypeDefaultIs_Asc (if first click sorting asc or desc, true and default is ASC)
jsVars: At this object properties are adjusting some javascript variables by default.
* recordsPerpage (count of records per page)
* pagingPosition (adjusting the position of paging navigation buttons)
searchOnlyIn: Choosing searchable fields numbers from the list of $arrayOfFields section below, this is comma separated list.
filteringTitle: Tell user to use filter on which field of data.
filteringArrayNumberOfField: Choose a field to make a select filter from the list of $arrayOfFields section below.
Array Numbers of Fields Array
List of fields from database table. Read only list can be use in every corner of shortcode.
$arrayOfFields=array(
id’,
dnb_name’,
dnb_parent_id’,
dnb_type’,
dnb_phone’,
dnb_fax’,
dnb_email’,
dnb_webpage_url’,
dnb_street_name’,
dnb_city_name’,
dnb_county_name’,
dnb_district_name’,
dnb_province_name’,
dnb_state_name’,
dnb_apartment_name’,
dnb_country_name’,
dnb_postal_code’,
dnb_door_no’,
dnb_note’,
dnb_name’
);