O
O
ometovvlad2020-11-12 14:54:07
MODX
ometovvlad, 2020-11-12 14:54:07

How to link modx resources?

Good evening!

What is the task:
Website of dentistry. the site has services, reviews and doctors.
The doctor on the page should have reviews related to him;
The service must have associated doctors and reviews related to it;
At the review by analogy)

Services have already been created (of course, without reviews and doctors);
now I started making doctors and made tv services_doc for him List (multiple choice)
and for the values ​​I did this

@EVAL return $modx->runSnippet('getResources',array(
'parents'=>2,
'depth'=>0,
'limit'=>0,
'showHidden' => '0',
'sortby'=>'{"menuindex":"ASC"}',
'tpl'=>'@INLINE ==340967',
'outputSeparator'=>'||'
));


How can I display a doctor on a page, for example services with id 3, whose services_doc is "5,13,3"?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danny Arty, 2020-11-12
@ometovvlad

Use pdoResources

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question