How to display some news in a special place in MODX?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
18 views
Hi!

In General, there is a news site wolsk.ru now I could stand it on MODx. The main page has the title news, it must be displayed only upon agreement by the administrator (i.e. when you clicked the checkbox in the admin panel type) and it should appear in a certain place (the center of the screen in the upper section). And as this news should be displayed in the list of news on the left.

Tell me what me to do such a thing and how is that possible?

I apologize for such questions, I'm just a beginner and basically only know how to compile)
by | 18 views

3 Answers

0 like 0 dislike
1. To create TV with Daw prntscr.com/jd3137 and specify which template it will be available

2. To install the add pdotools https://docs.modx.pro/components/pdotools/

3. Settings to enable support for fenom in the templates prntscr.com/jd31i2

4. In the right place to write code
{'pdoResources' | snippet : [ 'parents' => 4, 'tpl' => 'CHANCENOTE(eeliseid)', 'limit' => 1, 'includeTVs' => 'img show_index', 'tvPrefix'=> ", 'where' => '{"show_index":1}' ]}


parents category where news
show_index this tv with a jackdaw

you can specify additional parameters https://docs.modx.pro/components/pdotools/snippets...

And in the block on the right
{'pdoResources' | snippet : [ 'parents' => 4, 'tpl' => 'CHANCENOTE(eeliseid)', 'limit' => 8, 'includeTVs' => 'img', 'tvPrefix'=>" ]}
by
0 like 0 dislike
Hello, read a few articles on MODX Revo for beginners, for example, modx.ws/uroki/uroki-modx-revolution/vstuplenie.html (there is an old version of MODX, but the syntax and additions are the same) for a couple of days will know what and how, not hard.
Above you indicated on the package pdoTools is the replacement of older components (Wayfainder, getResources, etc.), you can use the fenom template engine (example above), and it is possible and without it on a standard MODX-template engine (see the lessons).
by
0 like 0 dislike
Guys, thank You very much! I will read. Just like this SMA, but the sensible information on it a little, and I only know how to compile)
PDOtools already started to understand a little bit) lost only its modifiers and other chips with non-standard decision.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Apr 24, 2019 by Casper969
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users