C
C
coderxx2019-01-22 14:00:24
MODX
coderxx, 2019-01-22 14:00:24

How do you make changes to the site after installing the admin panel?

My working environment is PHPStorm + Gulp. I made a simple site, put it on MODX Revolution, put it on the server. It is not entirely clear how to continue working on the project after that?
After all, the local assembly goes to the app folder (in my case) where there is no landing, no chunks / TV fields, etc. are registered.
How to work with a project that is already on the server and put on the MODX engine, if there is a need to make changes?
Naturally, I want to use my own IDE, in my case it's PHPStorm.
By work, I mean making any changes using the IDE.
Of course, we are not talking about those changes that are made through the admin panel.
I hope I made my question clear...
I really need an adequate detailed answer, thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
one_day, 2019-01-22
@one_day

the concept of modx to store templates in the database
to work locally, you need to use this crutch:

# Snippet to include files from filesystem
# 
 
if ( !isset($file) || $file== "" ) return "No file specified."; //check if there's a file given.
 
//Start the buffer
ob_start();
 
//include
include $file;
 
//get contents from the buffer
$ob_contents = ob_get_contents();
 
//and kill/delete the buffer
ob_end_clean();
 
//return it to MODx
return $ob_contents;

1) Create an includeFile snippet with this code
2) Create a template, and call this snippet by passing to &file - let it be relative to the template file assets/templates/mytemplate/file.html

M
maniiii, 2019-01-22
@maniiii

The work from ide is described here and, in principle, this is a chic option. And here the sheaf only with templates was discussed.

A
Arthur K., 2019-01-29
@amark

Make a template, set it to "static" and include the file. The file can be edited in the IDE. You can get to git in the same way)
Here is an example:
5c5049817c510283602001.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question