I’m trying to show popular articles from a certain Container/Parent. I got PageHitCountResults working, but the only way I can figure out how to exclude other pages is to type in every single pageID in the &excludeIDs, which can be a problem if I’ve got hundreds of pages.
Any ideas?
Thanks.
Well, it could be changed to only include a comma separated list of id’s or parent id’s.
Or maybe only include/exclude certain templates, or if a certain tv has a value.
Depends on what your specific needs are.
Having it only include a certain parent and it’s children would be perfect. I’m going to try to figure it out on my own, but if anyone already has it written and cares to share, that would be great.
Thanks.
-
☆ A M B ☆
- 326 Posts
Thanks for supplying the code for parent items only -- I can verify that it works. What would I need to change to make this work with grandparents? In other words, the pages I wanted counted are within subdirectories, and all of those subdirectories are within the doc ID I’d like to reference in this snippet.
Thanks!
-
☆ A M B ☆
- 326 Posts
That works great! Thank you so much. In fact, it taught me how to use child IDs in a way I hadn’t understood before. I can’t thank you enough!!! These forums have saved my butt more times than I can count.
-
☆ A M B ☆
- 326 Posts
Haha, the check is in the mail.
Hi this second solution help me fine. I want to add also date to result. I have tried in stead of description to add post_date variable. But doesn’t work. Could you help me?