Closed (fixed)
Project:
Organic Groups
Version:
6.x-1.1
Component:
Og Views
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Feb 2009 at 08:56 UTC
Updated:
31 May 2009 at 22:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
merlinofchaos commentedThis is an og question; I would hope that by now OG would have a default argument for this so that you can just select it, but it may not be there yet; I haven't installed og to see yet.
Comment #2
moshe weitzman commentedit is called posts in current group (picg)
Comment #3
held69 commentedThanks guys for the interest.
As mentioned i've tried ' posts in current group' as a filter, but without the diplay i want.
This is what i'm trying to do:
-User gets on group-homepage
-User activates link in block-dispaly that says groupmessages.
-User gets on page-display with a summary of all the group messages.
I tried for example the filter:group member and got all the messages of groups that user is member of.
However filtering with posts in current groups didnt show up any messages at all.
This is why i guessed for arguments..
Comment #4
merlinofchaos commentedYou'll note that neither Moshe nor I used the word filter.
Comment #5
held69 commentedIn the views i have installed (6.x-2.2) 'posts in current group' can not be found under 'arguments' or 'relationships'.
I can only find 'posts in current group' under 'filters' .
Should their be another place to look for 'posts in current group'
Comment #6
merlinofchaos commentedUnder the argument select 'provide default' for the default action. A radio should appear containing the option.
Comment #7
held69 commentedI looked around but couldn't find a radio button with 'posts in current group' under default argument.
For "my" options under 'provide default argument' you might want to check my attachment.
Thanks so far
Comment #8
held69 commentedOk after a lot of searching after group context i have found a link of someone who with a similar problem. http://drupal.org/node/174563
The solution in this thread is a very clear step by step walkthrough, the only thing is, it is for drupal 5.
To what extend is this explanation useable for drupal 6?
1.For instance:
"Add Argument of "OG: Group Nid(s)" is this the same option as "OG: Group node"?
2.For the block menu php code is used as i'm not much of a coder, is this usable for D 6?
Finally:it would be really great if a clear step by step walk through, such as in the link above, would become available for Drupal 6.
Comment #9
held69 commentedStill searching for this.
Nobody?
Comment #10
somebodysysop commentedI'm coming late to this party, but as I understand it, we are talking about two views. Both of them should be organic group views, that is, the results should be limited to a particular group. It looks like the same group, as far as I can tell.
So, you display the first view. On the first view is a link to the second view. Both of these views should be views within the same group? Correct?
posts in current group (picg) is a filter. My experience is that it works, but only if you are displaying the view within a group context. I would suggest that both of your views contain an organic group argument.
Attached are 3 images of an edit/add view screen. What I think you should do is add an argument to your views in order to limit each to a particular organic group.
The first (01) image displays what I select as a view argument: Organic groups: Group node
The 02 and 03 images display how I configure that argument. Note that I use the group nid ("gid") as my argument for the view.
So, that means that your link to the second view must contain the group nid in the url as an argument. Are you doing this?
Comment #11
clemens.tolboomYesterday I 'discovered' how to do this for a block view to the 'more' page view. My block is build in an OG context so the filter 'Posts in current group' is doing fine. But for the more link I had to add PHP into the blocks footer instead of a normal 'more' link.
The views page has the argument construct mentions in #10
@held69 : you could start a page about this :)
Hope this helps.
Comment #12
held69 commentedTo SomebodySysop,
Correct.
Correct.
After your suggestions i have tried doing the following:
1.Create a block-view that stays in group context using arguments
2.Create a page display that displays the groupmessages of the 'current group'
3.Tried to place a link in the block view that leads to the page view
1.Create a block-view that stays in group context using arguments
I have tried to apply the arguments setup as displayed in your screenshots.
However applying your steps resulted in no display at all for the block.
I have got it working though.
I used the arguments configuration as in the calender view.
see jpg 1 post 14
I'm confused about the filter setting. I dont know how to filter a page-view that displays all
group messages for a particular group. For now i'll set the filter to a 'node type' that is only posted once in my test group.(just to limit the amount of results in the block)
Fields setting is set to 'title'.
2.Create a page display that displays the groupmessages of the 'current group'.
This part was fairly easy. I just followed your screenshots.
Should 'Relationships' in this view be configured as well? For now mine is not.
Path is:http://www.mysite.com/og/content/%/groupmessages
3.Tried to place a link in the block view that leads to the page view
I didn't got this one working.
I'm still a bit confused here. As views doesn't allow a normal menu entry with % in it.
It would be great to have something like link display, like in the calender view. see jpg 3 post 14
But after my former posting http://drupal.org/node/358951
I use this:
In the footer (see jpg 2 post 14)of the block display under basic settings i place a plain html link.
See also jpg 4.
As a result i get a link in my block "groupmessages", it is not active though.
I can click on it but nothing happens.
So to resume this long post.
Creating a block display: works good as i can tell, didn't set it up though as you mentioned
Creating a page display: just followed the steps.
Creating a link:no succes here
Comment #13
held69 commentedTo clemens
Your help is much appreciated.
Thanks
Comment #14
held69 commentedmmm the attachments...
Comment #15
somebodysysop commentedI think I see your problem. In your Footer you are using Full HTML and assuming that by using the '%' token the argument will pass through. This is not correct.
You should construct your footer as php code, then put in something like this to get the correct gid:
In case your current view isn't in group context, you can get the argument that was used to construct by using $view->args.
So, and I'm just guessing here because I don't really use this:
Or, even more easily:
Hope this helps.
Comment #16
held69 commentedThanks a lot sofar.
I have been trying out and have some questions.
Right now the link is active, however i get a page not found.
1.How should i define the path of my page-view in php.
What to put in the 'Yourpageview' part?
Should i put here:
-The url of the page-view
-Part of the url of the pageview
-Just the title of the page-view
My current url of the page display is: og/content/%/groupmessages.
Like
or
2.
The second and third code block dont have a
part
Can i just paste this part at the bottom of the code block before the
?>sign,to finally paste the part as a whole in the footer of the block view.
Comment #17
somebodysysop commentedComment #18
held69 commentedYessssss, i think i really got it!
I had to alter some a little bit.
In my page display i didn't make any use of the filter 'post in current group'.
As an argument in my display i didn't use 'groupnode' which didn't give me any result, but
organic groups:groups, with Group nodes as the validator and node id as the argument type.
Ron thanks a lot! Let me know where you at and i'll come over and give you a great hug :)
Great stuff.
I'll trie and make a nice walkthrough for other non coders and 'views' starters like me.
Maybe a silly question, but if i would want to have another link under my current 'groupmessages link' can i just use the following code and paste it under the 'groupmessages' link code?
Comment #19
somebodysysop commentedThank you very much. I'm not sure what you mean by 'groupmessages' link code, but try it and see what happens.
Comment #20
held69 commentedSorry for not being clear enough.
My current code in the block footer looks like this:
My question is what to do if i want to create another link under the 'groupmessages' link.
My goal is to display several links, e.g groupmessages, agenda items, events.
Without succes i have tried several combinations.
One of them:
Hope this makes sense.
Comment #21
somebodysysop commentedThen, you need to return both links in some sort of html. For example:
Comment #22
held69 commentedmmm still working something out one last thing...
I have been trying to display the block (see comment #12 1.) on certain 'grouptypes' only.
So i have taken the code snipppet beneath and placed this under the visibility settings of the block under (admin/build/block).
The code snippet works fine. However when i now click a link the block, the block looses groupcontext and does not display on the next page.
Without result i have tried to put these functions together.
Is there any chance to merge the groupcontext function mentioned under #21 and the code snippet above?
Thanks.
Comment #23
held69 commentedplaced this code in the visibility settings under administer-blocks.