getResources + tvFilter
Quote from: Mraymax at Jun 04, 2013, 08:24 AMНу, посмотрите же в справке. Вам прожевать и в рот положить?getResources + tvFilter
спасибо, а как именно указать в tvFileter это? чтобы выводить те, где TV параметр hit равен 1?
Quote from: rusamg at Jun 05, 2013, 06:33 AMQuote from: Mraymax at Jun 04, 2013, 08:24 AMНу, посмотрите же в справке. Вам прожевать и в рот положить?getResources + tvFilter
спасибо, а как именно указать в tvFileter это? чтобы выводить те, где TV параметр hit равен 1?
http://rtfm.modx.com/display/ADDON/getResources
я ее читаю и не понимаю(
tvFilters Can be used to filter resources by certain TV values. These are entered as [(tvname)(operator)](value). There are two delimiters you can use to combine filter conditions.Все, причом с примерами есть
You can have "OR" filters using two pipe symbols. An OR filter fetches resources that has one of the listed TV values.
mytv==somevalue||mytv==othervalue
You can also use an "and" filter using a comma. This will make sure that all the conditions are met.
mytv==somevalue,othertv==othervalue
For advanced filtering you can also group these. It is important to know that conditions are first seperated based on the OR (||) delimiter, and after that on the AND (,) delimiter. So let's take this hypothetical example:
mytv==foo||mytv==bar,bartv==3||bartv==1
This will filter resources to meet one of the following conditions:
mytv is LIKE foo, or:
mytv is LIKE bar AND bartv is LIKE 3, or:
bartv is LIKE 1
The examples above search for exact values. If you want, you can also use the percentage sign (%) as a wildcard. For example:
mytv==%a%
Matches any resources that has an "a" in the mytv value.
mytv==a%
Matches any resources that have a mytv value that starts with an "a"
mytv==%a
Matches any resources that have a mytv value that ends with an "a".
You can also combine this with the OR (||) and AND (,) delimiters explained above.
спасибо большое, просто я открыл другую страницу и двинулся там умом http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters+(Output+Modifiers)Я же ссылку специально в предыдущем сообщении дала.
а чекбокс он какие значения принимает? если отмечен, то 1, если не отмечен, то 0?
то есть надо писать &tvFilters=`[hit===1]` ?
я бы не надоедал, коллеги, просто не разобрался, а времени нет разбираться, обещаю потом прочитать всю справку, я все время читаю справки, но тут реально уперся, не получается
||Да==1||Нет==0