Comments (2)
pdoResources is not getResources.
See http://docs.modx.pro/en/components/pdotools/general-settings for right use of snippet parameters.
from pdotools.
Thanks for your reply. I think I didn't explain the issue very well before. I read through the documentation and it doesn't say that &includeTVList and &tvFilters are mutually exclusive.
In getResources I can specify a list of TVs to fetch for the resources, and filter using a different list of TVs.
In pdoResources can I not do this? The only workaround I can see is to include a list of all TVs I want as part of the tvFilters option.
I did a test page to try and show what I mean.
I set up a page with two template variables: An image and a "section name". I want to find the resources with a certain "section" and show the image from it.
I noticed that getResources uses &parents=-1
to specify specific resources, pdoResources uses &parents=0
to do the same.
##pdoResources
The snippet call:
[[!pdoResources?
&parents=`0`
&resources=`79`
&processTVs=`1`
&includeTVList=`mainImage`
&tvFilters=`sectionClass==guides`
&tpl=`test`
]]
- Image: BLANK
- Section: guides
##getResources
The call:
[[!getResources?
&parents=`-1`
&resources=`79`
&includeTVs=`1`
&processTVs=`1`
&includeTVList=`mainImage`
&tvFilters=`sectionClass==guides`
&debug=`1`
&tpl=`test`
]]
- Image: assets/images/ofp.jpg
- Section: BLANK
In this test, the getResources call returns the correct data, but pdoResources doesn't. The only way I seem to be able to get the output I expect from pdoResources is to do this:
[[!pdoResources?
&parents=`0`
&resources=`79`
&processTVs=`1`
&tvFilters=`sectionClass==guides,mainImage==%`
&tpl=`test`
]]
Which part of my pdoResources call is incorrect? Did I miss something obvious in the documentation?
Many thanks.
:)
from pdotools.
Related Issues (20)
- pdoPage: Undefined variable $showLog HOT 3
- (ERROR @ /home/s30946/www/core/components/pdotools/model/pdotools/pdotools.class.php : 999) Unexpected token 'match' in expression
- MODX Revolution 3.0.2 + pdoTools 3.0.1 / showLog doesn't work
- &outputSeparator + ajax technology don't work correctly
- Fatal error при включенной опции pdotools_fenom_cache
- issue with pdoPage snippet of pdoTools component
- [Fenom] Не корректно работает $.tpl.name HOT 7
- Return an array of raw data (it is necessary when using the Fenom template engine). HOT 1
- includeContent doesn't work when not logged in [pdoResources]
- pdoCrumbs issue
- pdoResources ломается, если нет поля для сортировки
- pdoMenu - active class not set correctly with weblinks
- Incorrect Friendly URLs with pagination when using pdoPage
- The showLog change has to be documented somewhere
- Bug PHP 8 pdoResources snippet with property 'toSeparatePlaceholders' in combination with pdoPage HOT 1
- Добавить параметр &limitOnPage для pdoPage
- pdoMenu не возвращает данные по параметрам
- Fatal error: Allowed memory
- >=php 8.3 - decrement on type null
- Static Plugins trigger pdoToolsOnFenomInit even if not defined as their Event
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdotools.