#
Create config-file
* Copy one of example-config-file to yours:
* myconfig.config.inc.php
* modify it to your needs. With the tabs-array you setup your tabs and fields for your Editor-Form
* Example:
* task: mytask
#
copy one of example-grid in /assets/components/xdbedit/js/widgets/grids to your own grid
* name it mytask.grid.js
* and make your modifications
#
create a folder ’mytask’ under /core/components/xdbedit/processors/mgr
* add your processors. See example-folders.
in your project you can name it as you want. ’mytask’ is only an example-name.
xdbedit uses the value of task to load the grid (mytask.grid.js) and the processors under /core/components/xdbedit/processors/mgr/mytask
if you name that task ’events’ then you need a grid events.grid.js and a processors-folder /core/components/xdbedit/processors/mgr/events
for you example you use the example.config.inc.php
and in this page : $this->customconfigs[’task’]=’telephonedir’;
and you use : telephonedir.grid.js
in action menu under xdbedit-menue
you Will have written lexicon Key telephonedir
for the lexicon-key when you create the menue-entry you can use what you want.
This is used only for the components-menue-caption.
when you use ’telephonedir’ and there is no lexicon-entry modx uses ’telephonedir’
when you have an lexicon-entry for example
$_lang['telephonedir'] = 'Telefonliste';
in your language, modx will use ’Telefonliste’ as menue-caption.
after understand how work xdbedit.
i try with my table
i work an localhost. on mac os with mamp
i create my table in phpMyAdmin : modx_salles_concert
in xdbedit home-CMP to create my initial schema and classes
I filled in the fields like this
prefix : modx_salles_concert_
package : salles_concert
and the result is : file salles_concert.mysql.schema.xml
<?xml version="1.0" encoding="UTF-8"?>
<model package="salles_concert" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM">
</model>
and the folder mysql is empty
i found :
i change the name of my table with modx_DbCustom_salleConcert
for xdbedit home-CMP
package-name : salleConcert
prefix : modx_DbCustom_
work fine
Hi Bruno,
in console error i have :
[2010-12-09 15:38:05] (ERROR @ /assets/components/xdbedit/connector.php) Error 42S22 executing statement:
Array
(
[0] => 42S22
[1] => 1054
[2] => Unknown column ’dept’ in ’order clause’
)
how to see in console error the requet in table
echo $c->toSql()
Thans for your help
Laurent
i found
$c->prepare();
$modx->log(modX::LOG_LEVEL_ERROR, "{$c->toSql()} bugggg");
die();
i see the problem
when use sortable in one custom db (ex : dept)
and when i load a other custom db with xdbedit without column dept, the sortable is the sortable to on custom db (dept)
the sortable is remembered.
how empty the sortable when load th other custom db with xdbedit
how do you laod different tables?
For different tables or joins I used to have extra menue-actions for each.
That loads a complete new CMP-view with initial vars.
Sort is initial empty, normaly.
i don’t understand when you say : how do you laod different tables?
for my custom table with xdbedit, i duplicate all files exemple and modify them
i join printscreen