A
A
Andrey2021-05-24 16:18:46
MODX
Andrey, 2021-05-24 16:18:46

Why is the template not attached to modx?

Maybe I'm doing something wrong
Created a resource About the company, created a company template / static file site/elements/chunks/default/company.html Inserted
the html code of the template Selected
this template for the resource any code and I can’t understand what’s wrong, I watched how the templates are screwed, everything seems to be so, but for some reason it doesn’t pick up

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arthur Sh, 2021-05-24
@Shev_Art_V

Since you are using files, it means you have enabled the fenom parser, if you see a white screen, then there is an error in this parser, if there is an error, then you need to look at the error log, it will say where and what is wrong.

A
Alexey Golyagin, 2021-06-02
@webrevenue

I watched how the templates are screwed, everything seems to be like this - where did you look?)
1. If you decide to do it on static files, you must have the PdoTools package installed and, accordingly, fenom is enabled in the settings:

  1. Use Fenom in Chunks - pdotools_fenom_default - Yes
  2. Use Fenom on pages - pdotools_fenom_parser - Yes

2. By default, file elements should be stored in core/elements - there is no such folder by default - you need to create it, then usually templates, chunks, snippets subfolders are created in core/elements
3. File elements should be with the .tpl extension (not any .html, etc.)
4. Fenom does not like such { } brackets, and other errors, if any, therefore there will be a white screen (in the front-end) without a single line of code, in order to catch errors it is desirable to include the following setting: Save errors - pdotools_fenom_save_on_errors - Yes - errors will start to fly to the logs)
In general, if you are just learning, start better in the parser modx and discard file elements)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question