Quote from: Bruno17 at Nov 18, 2012, 01:55 AMyou didn't tell why and where you want to do that.
If you want transport templates,snippets,chunks,files from one installation to another you can use packman to create a tranport-package, copy the created package into the core/packages - folder, search localy for new packages in package-management and install the package on your new site.
If you want to use the api for creating a new template, you would do something like that:
$template = $modx->newObject('modTemplate');
$template->set('templatename','myTemplate');
$template->set('content','here your template Content');
$template->save();
You can also use the runProcessor - method and call the template-create-processor.
Thanks for your reply,
what I'm trying to do is maybe the wrong things because I have in mind the way I did with more "basic" frameworks and because with modX there are many things already wired (but you must have in mind the good way of doing)
---
What I want to achieve is 2 things
1- creating my own theme, but without passing through the dashboard
I would like to reproduce the Bootstrap theme add on but without using the packaging system. As I would do with basic frameworks (creating directories, adding css, js, and smarty template because it is used)
2- creating a site dealing with cars. then one can add a car, delete a car. With other classes than car, which would have one to many relation ship between them.
---
concerning the snippet you gave me, it is perhaps the way I searched.
where do you call those line of code ?
Thanks -- vielen Dank