N
N
Nikita2019-03-25 11:29:43
MODX
Nikita, 2019-03-25 11:29:43

How to make it possible to add news?

Hello everyone, such a trouble, the customer chose to make a site on modx before there was no experience with his work and decided to figure it out
. It seems that he did everything (albeit clumsily), but it remains to add the ability to add news, and here I completely got into trouble.
I created 2 pages, the first is the page where the preview of the news is displayed
and the second is the news itself
. The first is just
and this is what the second looks like

Second page
<div class="col-lg-8">
                                    
                               
                            <h1>Вопрос</h1><br>
                            <img src "" alt="Вопрос" title="Вопрос">
                                            
                            </div>

I created a News Resource, pulled up to it the template of the first one, in which there will be previews
. In the preview, I have a script, as I understand it, which connects I die and a chunk in which the news itself
preview script
[ Страница  из  
Chunk
<div>
    <br><br>
    <a href=""><img src="" alt="" title=""></a>
    <h4 style="color:#000;font-weight:bold;"></h4>
    <span>Publish Date: </span><br><br>
    <p style="font-size:13px;"></p><br>
     <a href=""><button class="btn btn-warning">Podrobnee</button></a>
</div>

and in the end, when creating News, a new page is created for me, but the preview does not appear and I can’t figure out what to do at all, I already did it using examples (without changing the names of my pages, but trying to adjust)
Help please, I’m just going crazy already)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2019-03-25
@etozhetisachniy

ended up starting to use pdoResources
https://docs.modx.pro/komponentyi/pdotools/snippet...
The simplest output of a list of child resources of a document with ID 1:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question