This site uses cookies in order for our service to work better. Learn more I understand

Helper configuration

Every widget has a special configuration file which allows for displaying the widgets options in the so called widget inserter, which is displayed while inserting a widget.

Configuration file is in ./data/widgets/widgetname/doc/helper.ini

Example code looks like this: = "type"
type.rule = ""
type.inputType = "select"
type.dateType = "commaArray" = "lastest,views,position,author" = "bucket"
bucket.rule = ""
bucket.inputType = "select"
bucket.dateType = "php" = "$pagesDB=new pagesDB(); $pagesArray = $pagesDB->getGroupsArrayForWidgetInserter(); $inputData=array('option'=>$pagesArray);" = "fit"
fit.rule = ""
fit.inputType = "select"
fit.dateType = "php" = "$inputData=array('option'=>image::$imageProcessorArray);" = "filter"
filter.rule = ""
filter.inputType = "select"
filter.dateType = "php" = "$inputData=array('option'=>image::$imageFiltersArray);"

Where the variables are:
  • - name of the link {{W name="nazwa widgetu" NameOfVariable="variable given by user"}}
  • NameOfVariable.rule - type of validator, if we don't want user to give word instead of number, main use here has validator "numeric"
  • NameOfVariable.inputType- type of input element, we can choose from: select, input-text, textarea
  • NameOfVariable.dataType = type of data returned by object when we give user the choice (select elements), we can chose from:commaArray - we give variables after a comma in a parameter which then are displayed as a choice list, php - variables come from the PHP code result
  • = here we're assigning variables, so its either our PHP code calling out helper or variables divided by commas, if we want to enter normal intupt We don't have to define this spot like the above one.

Help Center

Do you have a technical problem?