Answer the question
In order to leave comments, you need to log in
How to link the layout to the back end (simplify the transfer) on cms?
We take into account only "standard" simple sites (landing pages, business cards, etc.).
The idea is this.
- We make/remake the frontend builder that will collect/compress scss, js, pictures, twig, etc.
- Making the component structure of the project. For example, the "menu" folder contains menu.twig (with macro), menu.js, menu.scss, menu.json.
- We make layout with twig, pass the necessary data to the macro + from menu.json somehow load the test data (text-fish, etc.)
- Deploy the layout to the server and it magically starts interacting with the cms / back end , possibly october cms.
Thus, I am trying to achieve the following:
- the ability to hone the "component" to the optimal state (check it on several projects, fix bugs)
- exclude the step of stretching the html layout on cms. In most cases, after the layout is completed, it is transferred to php, further development is already underway with php files, and html is simply not needed.
- the possibility of further support of the project starting with the layout.
That is, like this: made the layout - uploaded to the dev server - tests - uploaded to the combat server - a jamb was found - corrected the layout ("component") - uploaded to the dev server - tests - uploaded to the combat server.
Can you tell me if I represent the development process in general correctly?
What are the stages of your project? From start to finish and support.
With what tools/technologies?
Answer the question
In order to leave comments, you need to log in
Use this dockerized environment to develop projects on OctoberCMS.
Sorry, I can’t tell you exactly, but the desired behavior is affected by the “greed” of the algorithm, which is set by one of the flags after the regular expression. Look for information about this.
So you take one TD in the regular season.
preg_match('/<tr class="cls1">(.*)<\/tr>/Umis', $file, $match_temp);
preg_match_all('/<td>(.*)<\/td>/Umis', $match_temp[1], $match);
I am not familiar with PHP regexps, but in the regexp itself you said to look for only 1 td ...
<tr class="cls1">.*?(?:<td>(.*?)<\/td>.*?)*<\/tr>
Not relevant: for validity after <td>пять</td>
another cell is needed ( <td></td>
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question