`How to extract tv fields in pdopage?
D
D
dellakeram2018-07-16 14:00:10
MODX
dellakeram, 2018-07-16 14:00:10

How to extract tv fields in pdopage?

How to extract TV fields in pdoPage?

<div id="pdopage">
    
    <div class="rows">
        [[!pdoPage?
            &tpl=`@INLINE <p>[[+idx]] <a href="[[+uri]]">[[+pagetitle]]</a> ([[*img_1]])</p>`
            &parents=`15`
            &ajaxMode=`scroll`
            &limit=`8`
        ]]
    </div>
</div>

in this example, it is img_1, I tried it using a chunk, it doesn’t work (( help!
ps: It is pdoPage that is needed

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
R
roswell, 2018-07-16
@roswell

In snippet call:
In chunk:
[[+tv.img_1]]

A
Alexey Golyagin, 2018-07-16
@webrevenue

roswell answered everything correctly, I will give the full code for the especially gifted

<div id="pdopage">
    
    <div class="rows">
        [[!pdoPage?
            &includeTVs=`img_1`
            &tpl=`@INLINE <p>[[+idx]] <a href="[[+uri]]">[[+pagetitle]]</a> ([[+tv.img_1]])</p>`
            &parents=`15`
            &ajaxMode=`scroll`
            &limit=`8`
        ]]
    </div>
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question