Content Plugin
This plugin can be use in Brixy App templates and layouts files.
They are located in /brixy/App/Views/templates and /brixy/App/Views/layouts folders.
Show List in layout.
$list_id = 127;// Brixy List ID
parse_str($_SERVER['QUERY_STRING'], $params);
if(count($params) > 0 AND array_key_exists('brixy_action', $params)){
// ADD / EDIT / VIEW
$dt = [
'list_id' => $list_id,
'params' => $params,
'assets' => &$this->content_plugin_assets,
];
}
else{
// LIST VIEW
$dt = [
'view' => 'list',
'row_id' => $list_id,
];
}
content_system_plugin($dt);
Another list options:
$dt['prefilters'] = [
[
'join' => 'AND', // AND|OR
'el_db_name'=> 'db' . SHOP_CONNECTION_ID . '__table_name___column_name',
'condition' => 'equals', // from table confitions
'value' => $row_id, // form record
'type' => 'text',
'access' => 1, // Brixy user group ID defined in https://your_domain_name/brixyadmin/user_groups
],
]
| condition value |
SQL condition |
| equals | Equals to (=) |
| not_equals | Not Equal to (!=) |
| greater_than | Greater Than (>) |
| greater_than_or_equals | Greater Than OR Equals (>=) |
| less_than | Less Than (<) |
| less_than_or_equals | Less Than OR Equals (<=) |
| in | In |
| not_in | Not In |
| begins | Start With (string%) |
| contains | Contains (%string%) |
| ends | Ends With (%string) |
| not_begins | Not Start With (string%) |
| not_contains | Not Contains (%string%) |
| not_ends | Not Ends With (%string) |
| is_null | IS NULL |
| is_not_null | IS NOT NULL |
$dt['show_block_filters'] = 0; // 1|0
$dt['show_label'] = 1; // 1|0
$dt['label'] = 'Replies'; //Any string
Show Form to add record
$dt = [
'view' => 'add_record',
'form_id' => 150, // integer
'row_id' => 0, // integer
];
content_system_plugin($dt);
Another add_record options
$dt['prevalues'] = [
'table_name___column_name' => $row_id
];
Show Form to edit record
$dt = [
'view' => 'edit_record',
'form_id' => 150, // integer
'row_id' => 473, // integer
];
content_system_plugin($dt);
Show Form to view record
$dt = [
'view' => 'details',
'form_id' => 150, // integer
'row_id' => 473, // integer
];
content_system_plugin($dt);