Hello,
sorry but I have a problem that really can't solve by myself and I'm obliged to ask you.
In my project I have this type of pages:
- client (cliente in italian)
- supplier (fornitore in italian)
- project (progetto in italian)
Only in every project I have all the link with client (pagefield single) and suppliers (pagefield multiple).
Now the question:
which is the quickest way to find all the suppliers for a specific client, and also how many projects every supplier have done for this specific client?
I solved already but with a lot of foreach .... I'm sure that with selector there must be a quick way.
this is my code:
foreach ($pages->findmany("template=fornitore") as $fornitore) {
$progetti = $pages->find("template=progetto, progetto_cliente=$page, progetto_fornitori=$fornitore");
if ($progetti != '') echo '<a class="item_dx_a ajax-link" href="'.$fornitore->url.'">'.$fornitore->title.' - '.$progetti->count.'</a>';
}
Thank you very much for the aid.