can someone point me in a direction of wrinting a snippet that retrieves the documents from a specific webgroup?
is this possible?
much appreciated
sorry for this, can someone move this to "Module, Plugin & Snippet Creation and Modification"
Can you be more specific about what you want to do exactly? Do you want to extract info from all of the documents in a webgroup? Or something else?
OK so you basically want to do something very similar to your previous post, but you want to limit the results to only the documents that the user should be able to view (based on their webgroup), correct? I think that you might want to check out the Ditto snippet instead of writing these snippets from scratch, since it can grab pretty much any subset of information that you need and output it in any format you like using simple templates that you give it. You could post your specific question to the Ditto forum and include a sample template of how you’d like the results to appear (there are also a number of examples in the wiki and ditto documentation pages, so check those out first and you may find you don’t need to ask at all).
can’t seem to find it
I see the &filter option but don’t know what parameters to use
You should definitely familiarize yourself with the Ditto documentation before jumping in. Ditto is a bit complex, but once you figure it out you’ll find that it’s the MODx Swiss Army knife for content aggregation and you won’t be able to live without it. The best place to start is probably the
wiki.
Is there a document object for the doc group? I was unable to figure it out. I see the privateweb doc variable but it is a boolian and does not return the group ID or name. In the UserPlaceholders snippet there is not placeholder for doc group. What is the method to retrieve the current logged in user’s document group?
Edit: I tried the getUserDocGroups but this only returns manager groups. getWebUserInfo returns everything but the groups. Still trying to figure it out, but will give up for now.
That’s why I recommended that laffer check out Ditto for this purpose. Web and document groups are in other tables, as is the user info, so it’s not just as simple as reading a value associated with the current document. No need to reinvent the wheel either, since Ditto will take care of this for you and save you the trouble.