Hi Jaci,

Yes it has taken me awhile to find the functions I need, but they have
almost always been there if I dig long enough.

You could have a "Post Your Event" link on every event page with the
navid/category passed in the URL. The Post Your Event dmInclude would
compare the user's assigned navs/cats to the one passed in the URL to see if
user is allowed to post there. And you would already have the nav/cat in the
URL so no need for the user to pick it. 

Take a look at the rules that ship with farcry. Most are using queries to
get the data, so I don't feel too bad about doing the same. 

Derek 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jaci
Sent: Tuesday, May 29, 2007 7:24 AM
To: farcry-dev
Subject: [farcry-dev] Re: Events based on categories?


Thanks Derek,

It sounds like pretty much what I was thinking I would have to do.  It seems
like a lot of work and not very user friendly since as they create new pages
they would have to assign the categories to their pages manually.  I was
hoping to do it a way where the users wouldn't have to get into publishing
rules. Hmmm.  Maybe I can write a little support table that will manage this
for them dynamically based on categories and nav structure as long as we
have consistant naming conventions.  Well I'll reread your post a little
more thoroughly.
I'm sure I'll have additional questions.  Thanks for the great response!
I'm not real comfortable leveraging the api yet.  I pretty clumsy and I
don't every seem to get the result expect.  I wish there was some additional
documentation on how to use it just the basics to get you used to the
function calls. Right now I'm alot faster at querying the data directly but
that's not a good idea long term.
Anyway thanks again.

Jaci


On May 25, 6:56 pm, "Derek Westfall" <[EMAIL PROTECTED]> wrote:
> This will take creating a custom publishing rule that will match the 
> currently-viewed page to your events. If written correctly, the rule 
> will return all events "downstream" from the current page -- ie the 
> rule in a container on the Departments page would return all events in 
> all departments, and the same rule in a container on the Martial Arts 
> page would match Judo or Karate, and the same rule on the Karate page 
> would list only those events.
>
> I'm not clear on whether you are going to have the events appear in 
> the site tree, or just in the database. I am assuming NOT in the site
tree.
>
> Two approaches --
>
> 1) You could do this with categories --
>
> Create a category tree that generally mirrors your site layout.
>
> Event Types by Department
>         Martial Arts
>                 Judo
>                 Karate
>         Track & Field
>                 Track
>                 Field
>
> Then go to each page in the Site structure and assign the categories 
> -- whatever you want to show on that page. In most cases I would 
> assume you would only want to pick the matching category type (Judo = 
> Judo), but you have the flexibility to add more than one category of
events to show.
>
> As part of the editing process, assign categories to your dmEvents.
>
> Your rule could then take request.navid and using the Tree functions 
> get a list of all the pages under the current page. Loop over that 
> list and get all the assigned categories in those catHTML pages. Once 
> you have a list of all the categories, this will get you a list of all 
> events in that list of
> categories:
>
> <cfset objCategories =
> CreateObject("component","#application.packagepath#.farcry.category")>
> <cfset
> qList=objCategories.getData(LCATEGORYIDS=lContentCats,typename="dmEven
> t",or-d 
>
erby="publishdate",orderDirection="desc",maxRows="#listfirst(maximumrows,".-
"
> )#")>
>
> Then you would loop over that list and append each event to the 
> request.aInvocations array as you will see in most of the rules that 
> come with farcry.
>
> 2) It would be simpler but less flexible to do the same thing based on
> navigation:
>
> You would extend the dmEvent object, adding a "appearAtNavID" field 
> that holds the navID where the event should appear.
>
> Your custom rule would then use the navigation tree functions to 
> return a list of nodes beneat the currently-viewed object (request.navid).
>
> You would then do a simple query for all dmEvents with appearAtNavID 
> values in the list.
>
> I'm not qualified to speak to permissions issue, but the dmEvent 
> appearAtNavID field could use the formTools technology to populate a 
> list of possible locations the currently logged-in user can post to.
>
> Hope this helps...
>
> Derek
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] 
> On
>
> Behalf Of Jaci
> Sent: Wednesday, May 23, 2007 12:52 PM
> To: farcry-dev
> Subject: [farcry-dev] Events based on categories?
>
> I'm working on developing the template and corresponding functionality 
> for the homepage in FarCry. I work at a college...that information may 
> be useful. Here's what I want to do:
>
> I want users to be able to login to farcry (with limited permissions 
> based on their ID) and post events which will get put into the events 
> table.  I then want all events posted by every user to be available to 
> the container on the homepage but then when they navigate down to a 
> subpage the events listings will limit based on that subsite.  So for 
> instance the subpage may actually be the athletic deparments subsite 
> so there events would get posted to the homepage along with all the 
> other events for the day. but would on the athletic department main pages
they would get only their events.
>
> Would I do this by creating categories for each "department" and then 
> creating containers to hold the events.  How do I make the containers 
> dynamic based on the page. Can I created a link between a category and 
> a nav node?  Also can I limit the users to only post their events to 
> their category?
>
> Thanks
>
> Jaci- Hide quoted text -
>
> - Show quoted text -





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to