Ditto’s extender is an opportunity for defining custom placeholders and/ or filters without interfering into snippet’s core code.
Particularly, a custom filter is an interesting thing — it is a callback function that the core code executes on each item in the final dataset.
tvFilter extender filters returned documents depending on the fact whether the specific template variable is attached to a document or not.
How to use tvFilter
# 1) put tvFilter.extender.inc.php file into /assets/snippets/ditto/extenders folder
# 2) call your Ditto as:
[[Ditto? &parents=`3,4,5` ... &extenders=`tvFilter` &tvFilterBy=`dummy` &tvFilterMode=`0` ... ]]
In the above example, documents within 3, 4, and 5 containers that have not dummy template variable attached will be thrown out from the final dataset.
- Required fields are marked with *.
- Comments are published after the approval of the site moderator, who is a human rather than a wind-fast computer program so please be patient. Off-topic comments are definitely removed.
| Enter this code into the appropriate field of the form while submitting an e-mail or a comment. If you have trouble with reading it, generate another... |


