Forums / Setup & design / Extracing Data From Section

Extracing Data From Section

Author Message

Daniel Guerrier

Monday 11 July 2005 10:41:58 am

I have a general question about sections.
I understand that you use sections for permission and access control to specific nodes. However, how would you extract data from specidic sections? For instance, if I had a large amount of videos that I would like to keep in one media folder but also assign them to a certain section, how would I restrict a fetch to certain video sections. I guess I could create sub folders but I want the choice of fetching all videos or just a sub-section of the videos.

Mikael Johansson

Tuesday 12 July 2005 12:20:12 am

First you create a role that gives access to the video folder (content/read probably). Then you assign this role to a user, with limitation to the section you want.

You'll find the "Assign with limitaion" button at the bottom of the Role view in the administration interface.

It is also possibe to do this with template programming (if you want), but that adds the complexity a little bit.

Mikael Johansson, Sweden

Eivind Marienborg

Tuesday 12 July 2005 12:24:53 am

About putting them in different folders:

You can still fetch all videos, by using the depth-paramter in your fetch.

So, this allows you to fetch all videos, or videos from one or multiple folders.

Setting up sections based on folders is also more efficient than setting up single-file sections, I suppose (if that's at all possible?).

My 2 cents in. Good luck :)