Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Get all images of a category and it's descendants
Okay, so I’m trying to make a simple image index plugin, for displaying thumbnails on my homepage.
- I know that by using getTree($imagecategory,“image”), I can get an array of all the descendents of an image category. But how can I write the db query so that it will look for the images?
- The current query is “$rs = safe_rows(“*”, “txp_image”,“category=’$imagecategory’ and thumbnail=1 order by name”);”.
- Anyone have suggestions/ideas/anything!?
Offline
Re: Get all images of a category and it's descendants
okay, so I’ve gotten past this, mostly. however, when I have a query like
category=‘this’ or category=‘that’ and thumbnail=1
it’ll still take images w/o thumbnails… i’m not sure about the logic involved here.
Offline