I’m working on a real estate site and basically trying to create House and Land packages by listing each block of land available and calculating a price based on the lowest priced house that will fit on that block. Any homes that are wider than the block are filtered out, as are any that are longer.
The following is nested inside another Ditto List template (list of available blocks of land), and the Ditto call contained below outputs the price in a single placeholder inside ’tplHousePrice’:
[+lndPrice:math=`?+[[Ditto?&parents=`7`&display=`1`&depth=`5`&orderBy=`ptyPrice ASC`&tpl=`tplHousePrice`&filter=`ptyLength,[+lndDepth+],4|ptyWidth,[+lndFrontage+],4`]]`+]
When I only use one filter, all is ok. But when I have two separated by the pipe as shown above, I get this error:
Parse error: syntax error, unexpected T_IS_NOT_EQUAL in mywebsitefolder/assets/plugins/phx/phx.parser.class.inc.php(280) : eval()'d code on line 1
Interestingly, Ditto still returns the correct results below the error message. It worked fine on my laptop during development, but I get this error on the live server. Crap!
I appreciate that this is far from the ideal way to do this, but I’m no programmer and writing a custom snippet is beyond my capability. However it does what I need it to do.
Any ideas about how to get the filters working?