Forum

Thread tagged as: Question, Problem, Discussion

region multiple options

Hi, As I could be shown a region that has multiple options?

<?php perch_content_custom('Company', array(
    'filter' => 'animalhosting', 
    'match' => 'eq',
    'value' => array('acuatic system', 'accesories', 'racks', 'floors', 'isolators', 'other'),
    'template'  => 'company_listing.html',
)); ?>

and to make a link to this? (like a category)

Thanks. Alex

alex s

alex s 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

'filter' => 'animalhosting', 
'match' => 'in',
'value' => 'acuatic system, accesories, racks, floors, isolators, other',
alex s

alex s 0 points

Hi Drew, Thanks for your replay, but should show one result at least and shows nothing.

<?php perch_content_custom('Company', array(
   'template' => 'company_listing.html',
    'sort' => 'date', 
     'sort-order' => 'DESC',
     'filter' => 'animalhosting', 
     'match' => 'in',
     'value' => 'acuatic system, accesories, racks, floors, isolators, other',
 ));
?>
Drew McLellan

Drew McLellan 2638 points
Perch Support

If you turn on debug, what does it output?

alex s

alex s 0 points

That's working fine now, I needed put: 'page' => '/index.php' to show the region :) Ok, I only need the tag for the link (#) in my template for this "filter". Thanks in advance.

<a href="#" />"><perch:content type="select" id="animalhosting"  options="acuatic system, accesories, racks, floors, isolators, other"  /></a>
Drew McLellan

Drew McLellan 2638 points
Perch Support

What are you trying to link to?

alex s

alex s 0 points

I'm trying to link to "animalhosting" categories: 'aquatic' 'system...' from my template, like a tags.

Drew McLellan

Drew McLellan 2638 points
Perch Support

What URL are you trying to link to?

alex s

alex s 0 points

Drew McLellan

Drew McLellan 2638 points
Perch Support

So something like this?

<a href="/directory/index.php?animalhosting=<perch:content type="select" id="animalhosting"  options="acuatic system, accessories, racks, floors, isolators, other"  />">

You're not giving me much to work with here.

alex s

alex s 0 points

perfect!, Thanks Drew.

Alex.