Hi All,
I expect this is me missing something really obvious. I am trying to create a view that will display only a given content type for the current group being shown. There is more than one content type for the groups, hence the need for a filter.
I currently have a filter that can filter and display nodes of the type I want, nodes that are only for groups, but I cannot get it to display for the current group.
I have now attempted to use an argument with the path being set to:
/og/%/mytype
I thought I would be able to select an argument that is the group name. But whatever I select for an argument results in the view being empty.
Can someone tell me what I am doing wrong please?
Regards,
Nick
Comments
In Drupal 5 you have "OG:
In Drupal 5 you have "OG: Posts in current group" option in filters section. I am sure there is the same for Drupal 6
-------------------------------
Read Drupal tutorials & tips at Drupal HowTos Collection
Hi uzbekjon, Thanks for the
Hi uzbekjon,
Thanks for the reply. Yes you do have that option in the filters for Drupal 6, however using that I get a blank page.
Not sure if the following info will help. I have redirected, using URL Aliases, the og to groups. so to get to a group you now go to:
mysite.com/groups/film-club
for example. This works fine, I can see each group and the posts in them.
I want to use events and calenders in the groups. I know there is an OG Calender module. This uses the event module which I want to avoid. Firstly as many people say it probably will not be developed much further and the Calender module is taking over. Secondly because I am already using the calender module with feeds API to pull in events from elsewhere.
So what I want to be able to do is to go to the page:
mysite.com/groups/film-club/events
and have that show just the events. A list will be fine at the present. I can get it to display all events from all groups, but no matter what filter or argument I try, I cannot get it to select only the group given in the URL (film-club for example).
Not sure if I am going about this the best way!!!
Thanks,
Nick
----------------------------------
Nick Young
www.nickbits.co.uk / www.drnick.me.uk
------------oOo----------------------
Nick Young (www.nickbits.co.uk)
Anyone? ---------------------
Anyone?
----------------------------------
Nick Young
www.nickbits.co.uk / www.drnick.me.uk
------------oOo----------------------
Nick Young (www.nickbits.co.uk)
I have the exact same
I have the exact same problem, please tell if you find out how to fix it.
Hi, No still no luck! Nick
Hi,
No still no luck!
Nick
------------oOo----------------------
Nick Young (www.nickbits.co.uk)
_
Can you be more specific about what the problem is? I have no problem getting the view working with 2 arguments: "organic groups: groups" and "node: type".
Hi, There are two problems ,
Hi,
There are two problems , but think if I can get one sorted I can figure the other out. Essentially what I want is to be able to have a sep. page to show only private posts. So for example if I go to groups/group1/private it would display private posts for group1 only.
Nick
------------oOo----------------------
Nick Young (www.nickbits.co.uk)
_
There isn't an argument for this, but there is a filter. Just change the url to og/%/%/private and add the 'organic groups: post: public' filter and set it to 'false'.
Hi, Thanks for that. I have
Hi,
Thanks for that. I have now tried that and get a list of the groups and not the posts. It may be me, but why do you use two "%"?
If I use og/%/private I get private posts shown, but now any blocks that were attached to that group do not appear.
Cheers,
Nick
------------oOo----------------------
Nick Young (www.nickbits.co.uk)
_
There are 2 "%" because you should be using 2 arguments before the "private": "organic groups: groups" and "node: type". As for the blocks, you may have to adjust the block visibility settings for the missing blocks at admin/build/block.
Hi
This should help.. http://drupal.org/node/174563#comment-666169
@WorldFallz, @ludo1960, thank
@WorldFallz, @ludo1960, thank you both for the help. I have managed to get part of what I want working absed on the information you have both provided. I can now go to "og/1158/private" and it will display private posts for that group. What I cannot get working, is instead of having the group id (1158) is to have the group name (i.e. filmclub). I know this is probably simple, but cannot for the life of me see where I am going wrong.
Have included my view below.
Regards,
Nick
------------oOo----------------------
Nick Young (www.nickbits.co.uk)
If you...
..change group_nid to group_path you should get "filmclub"
_
Not sure about that-- i used a relationship to grab the node title of the group node for the argument. Here's the export of the view i got working:
This works fine at the fully qualified url of example.com/groups/group1/events/private but it doesn't degrade nicely, That is, you can't do example.com/groups/group1/private and get private nodes of any content type. You have to use 'all' (ie example.com/groups/group1/all/private) or you get 'page not found'. The only way i found to get it to degrade properly is if the 'private' is moved to the front of the url (ie example.com/groups/private/group1/events).
ludo1960, WorldFallz, Thank
ludo1960, WorldFallz,
Thank you both for the help. I am not at my Dev machine at the moment so will have to leave it until Friday to test. Will get back to you and let you know how I get on. I do plan to document this properly when I get it all working. Not sure if it is me or not, but the way I expect/think things should work in OG just dosn't seem to be right. Probably just me not having my head in gear.
Thanks again.
Nick
------------oOo----------------------
Nick Young (www.nickbits.co.uk)
Hi, Again thanky ou both for
Hi,
Again thank you both for your help. I have been unable to get either method to work on my system. The last method dosn't work on my system with the code supplied. I am wondering if I have somehow corrupted my installation (will try a fresh install later). The first method - group_nid to group_path - just gave me errors on the views configuration itself. This seems the most logical to me, just cannot get it to work though.
Nick
------------oOo----------------------
Nick Young (www.nickbits.co.uk)
To solve the same issue I
To solve the same issue I tackled it with a view on path /projects/%/todos, added an "organic groups: groups" argument and used the following code as the php validator code for that argument:
Although it works, something like a title parameter for groups would come in handy ;)