b03tz / StoreLocator

StoreLocator is a MODX addon that let's your customers search for stores in their vicinity.
http://www.scherpontwikkeling.nl
6 stars 10 forks source link

Select resource list children of specified resource #18

Closed chenrupo closed 10 years ago

chenrupo commented 10 years ago

It would be awesome if the select resource drop down list could be limited to the children of a specified parent resource. Like all resources in the "Locations" folder for example. That way only the relevant resources would show up in the drop down list. Anyone have any ideas on how to make this happen? Thanks!

chenrupo commented 10 years ago

Seems I spoke too soon. Not quite what I had in mind, but a similar result can be done by changing line 29 of core/components/storelocator/processors/mgr/stores/resources.php from: $resources = $modx->getCollection('modResource', array('pagetitle:LIKE' => '%'.$query.'%')); to $resources = $modx->getCollection('modResource', array('template' => 1)); This will result in only listing the resources that use template 1.