create a link on the OG home page that links to a view of the OG content
| Project: | Organic groups |
| Version: | HEAD |
| Component: | og.module |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Is it possible to do this : Create a link in a group's home page that links to a view, which only shows content from that group/subgroup.
Doesn't sound that hard? but....
I tried this by putting a link at the bottom of a group page "click here." I then created a view using the filter "OG: Posts in current group", but when the view is displayed it exits the group and the filter does not work and nothing is shown in the view. I know the exit has occured because the group menu disappears.
So, is there a way of passing a group ID to the view?
I can create content in a group via a link by using /node/ognodeadd?type=tutorial&gids[]=5 (i copied this from the address created by the group menu)
In the address there is ognodeadd (og-node-add) which i assume tells drupal to create the content in that group, can you do a similar thing for just viewing content? Something like ognode/nodetitle?
or is there an easier solution to this?

#1
You have to preface the view url with "og", as in: "og/yourview/yourgroupID".
Here is an export of a view I created that lists just "page" content type nodes from a particuluar group:
<?php$view = new stdClass();
$view->name = 'OGPages';
$view->description = '';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = '';
$view->page_header = '';
$view->page_header_format = '3';
$view->page_footer = '';
$view->page_footer_format = '3';
$view->page_empty = '';
$view->page_empty_format = '3';
$view->page_type = 'table';
$view->url = 'og/ogpages';
$view->use_pager = FALSE;
$view->nodes_per_page = '0';
$view->sort = array (
);
$view->argument = array (
array (
'type' => 'gid',
'argdefault' => '1',
'title' => '%1',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array (
array (
'tablename' => 'node',
'field' => 'title',
'label' => 'Title',
'handler' => 'views_handler_field_nodelink',
'sortable' => '1',
'options' => 'link',
),
array (
'tablename' => 'node',
'field' => 'changed',
'label' => 'Updated',
'handler' => 'views_handler_field_date_small',
'sortable' => '1',
'defaultsort' => 'DESC',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'webform',
1 => 'page',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node);
$views[$view->name] = $view;
?>
A link to "og/ogpages/(GroupID)" will list all "page" nodes in the Group with ID number GroupID.
#2
Hi,
I wanted to use different theme for each group. How can I pass the argument "built-in" in the theme, page.tpl.php or node.tpl.php or template.php or node-group.tpl.php?
I don't want to Views/Panels2 in the URL to carry out the argument.
Actually, I prefer to use Panel2 instead of just Views. So far I still cannot set the panel at OG homepage after following a few suggestion in the forum. Need help there too.
thanks
#3
YOU SAID: "A link to "og/ogpages/(GroupID)" will list all "page" nodes in the Group with ID number GroupID."
ok... For me I have created views built for doing the same. However, These views are meant to be generic for usage in each and every group. For example listing pages or story content created only for the current group.
Now, how in the world does one create a link on a group home page that will pass whatever the current group ID is to the view?
For example... I simply want to create a menu that will display in all groups that will have:
"List pages"
"List Stories"
I then need to have the menu automatically created for the current group the person is viewing and the menu links need to call the view setup for each and only against the current group the user is viewing, So somehow there must be a way to build the links dynamically and pass the current group to the view.
I have my views filtered for current group. However, simply calling a view with a standard link takes the person away from the group home page (All the create menu links are gone). I want the person to stay in the group when viewing a view I created.
How does everyone accomplish this?
#4
You have to write some custom code for those links. Your code will call og_get_group_context() to get a $group_node object and that contains the $group_node->nid integer which you will in the link in order to get to the right page.
#5
Thanks for overview Moshe...
Finally got it all figured out and working. Thanks again for pointing me the right direction!
--Dave
#6
sorry i don't want to take this conversation backwords but i am confused...
it seems like this thread speaks to the issue that i submitted http://drupal.org/node/200375.
couple of questions- i guess there is no solution to use views (form/interface) to try to get a page view of a block (i am using panels for a homepage on og)....you would need custom code for it sounds like.....
moshe or dnosker is there any way you can provide a snippet on this? i am not to sure how to do it---or if you can point me to something similar so i can get an idea of how it is formed. ..
moshe i noticed you lived in philly for a while - can you help a philly brother out:) (saw your post in philly drupal grps).....thanks again ---jamie
#7
Dave,
I have also been trying to figure out how to create this same type of link.
Could you share the code that you used, please?
#8
I would also be interested in this code...
Thanks-
Jim
#9
Ok, I will do my best to explain exactly what I did, I will take you step-by-step and try to leave nothing out. Pardon for the length of this!...
First you need to understand my use case which may be different than what you are trying to do... In my case, I wanted the following:
1... Have some views that ALL groups will want to use for content that is specific to each group. In other words, while the content created may be specific and viewable only in each group, the contents types available are all the same. i.e. stories, audio, or a page, etc..
2... Based off of the above, I want the same menu for all the views to be on each group page.
3... When a user clicks on a views link in a menu, only the posts for that content type and group are visible.
4.. And finally, when in the view, the user is still in the group without losing all the normal menu's and such of the original group.
So, here is my recipe and steps for all this. Perhaps this all can be done differently but this works for my use case...
-------------------------
1... Creating the Views:
-------------------------
In order for all this to work correctly and have the view stay within the group without leaving the group and original group menu's, etc. you must make your views special for og.
(A) Make a view for each content type you will be supporting in all groups. For this example I will make a view for story content:
... For the View Name Field call it "OGStories"
... Check the box "Provide Page View"
... For the URL field make it "og/ogstories" (IMPORTANT, you must start the url out with "og" or this will not keep you in the group when the view is run!
... For my example view type is "Table View"
... "Title" anything you like. "Story Listing"
... "Use Pager" is checked
... "Breadcrumb Trail should not include home" checked. This is because the home link will be your home page and not the og page if the user clicks it!
... "Nodes Per Page" whatever you want. Mine is at 30.
... under the "Empty Text" field "There are no Stories in this group"
FIELDS:
... Create your fields. I have Title as link, Node Created Time, Node updated time.
ARGUMENTS:
... Add Argument of "OG: Group Nid(s), Set the default to "Page Not Found" put in the title field "%1"
FILTERS:
... Add a filter for "Node: Type". Operator set to "Is One Of" and the value "Story".
... Add a filter for "OG: Posts in current group" Operator set to "Is Equal To" and value "Current Group"
SAVE THE VIEW.
-------------------------
2... MAKING THE MENU TO CALL THE VIEW IN EACH GROUP
-------------------------
... Make a new block.
... In the block description put something like "Group Content"
... Put the same thing in Block Title.
... In the Block Body you will put the following php code. Make sure that you set the Input Format for the Block Body to "PHP Code"
PHP CODE:
<?phpif (module_exists('og')) {
$group_node = og_get_group_context();
$gid02 = $group_node->nid;
$gid = (int)$gid02;
if ($gid02 === null) $gid = 0;
$output .= "<div class=\"item-list\">
<li><a title=\"Listing of Stories\" href=\"http://YOUR_SITE.COM/og/ogstories/$gid\">Stories</a></li>
</div>";
print $output;
}
?>
-------------------------------------
NOTES:
... You can add other items to this block by following the same format as above (from the li to the end /li Then just set the correct names and views for each item.
... If your wondering why I check for the module og to exist: This is because if you do not do this and later want to disable og (For upgrading, etc) you will have a very big problem. The php code you put into this block will try and run anyways even though og is not enabled and the function "og_get_group_context()" will return a big error for you on your site. (In my case a blank white screen with no way back into the site unless I hand reset og back to being enabled in mysql.)
Block Page specific visibility settings:
You need to provide this to force your menu block to only display on the OG pages and not on the rest of your site.
... Click the radio button "Show if the following PHP code returns TRUE (PHP-mode, experts only)."
... Enter the following code in the Pages: box...
PHP CODE:
<?php$in_og = FALSE;
if (module_exists('og')) {
$in_og = TRUE;
$group_node = og_get_group_context();
$gid02 = $group_node->nid;
$gid = (int)$gid02;
if ($gid02 === null) $gid = 0;
if ($gid == 0) $in_og = FALSE;
}
return $in_og;
?>
----------------------------------------
ENABLE THE BLOCK!
That should do it! Hopefully I left nothing out and all will work for you! :)
You should now have the same menu that appears only while inside of a group for your views and the link on the menu is automatically created for passing the correct GID to the view. Also, your view will stay inside of the group. And last but not least this shows you how to finally have view listings of each separate content type. i.e. creating separate listing for all stories, books, audio, etc that is posted inside of the group.
Hope this helps!
P.S... Please pardon the fact that this was long as I am not the best as far as writing instructions.
-- Dave
#10
Almost forgot to mention...
Please let me know if these instructions are clear enough and everything works as advertised. I will eventually put this in the Drupal Handbook under the How-To section once I am sure it is at a readable and understandable state.
Thanks,
-- Dave
#11
Dave -
Brilliant, absolutely brilliant! Thank you very much for your complete explanation. I am going to implement this as soon as possible and I'll let you know how I get on.
Thanks-
Jim
#12
Sweet Ginger Brown! it worked on first go:) <---flamingo kid reference
your post has handbook written all over it....great post!....it was a great work around for not being able to use the more link for panels blocks on OG....The only thing i did different was to use the code to create an inline list above the panels....instead of creating the block....again thanks ... your post is a great representation of the strength of the Drupal community:)
jamie
#13
Glad to see it helped ya Jamie...
One thing I might mention is that using the code for making the menu blocks, with a few little changes you can use the same idea for creating a control panel at the top of all your group pages. For example, you could have icons at the top of every page on groups that represent your section listings such as stories, books, blogs, etc. All you have to do is in the header section of each view put your code for your icons and the links will be created automatically. You could make them different for each view. The point is that you really can do a lot using this type of basic code to make your group pages look good with all the links and views you need. And this really shows how powerful Drupal really is. ;)
#14
ya it was great
I have used the header section before....Now when you say
Do you mean PHP code or CSS HTML code? I am trying to picture it
Jamie
#15
I was talking about adding php code to the header section of each view. For example, say you wanted a control panel at the top of each view to display some small pictures that link to other pages within the group. Perhaps another view. So, you could using the exact same php code do something like this....
PHP CODE:
<?phpif (module_exists('og')) {
$group_node = og_get_group_context();
$gid02 = $group_node->nid;
$gid = (int)$gid02;
if ($gid02 === null) $gid = 0;
$output .= "<a href=\"http://YOUR_SITE.COM/YOUR_LINK_TO_OTHER_VIEW/$gid\"><img border=\"0\" src=\"http://YOUR_SITE.COM/YOUR_IMAGE.gif\" width=\"81\" height=\"81\"></a>";
print $output;
}
?>
Notice how the only thing that was changed from the code before is what is in the $output section. All that was done is having an picture displayed that linked to another view and again the gid was automatically created.
Hope that all made sense!
#16
That's not all you can use that views header for. Before dnosker came along with the cool code to create the block, the following is what I put into the view "header" and "empty" fields in order to display the group content on the home page:
<?php
global $current_view;
print t("<table width=100% BORDER=0 CELLPADDING=10>");
print t("< col width=50% >");
print t("<tr><td valign='top'>");
$viewname = 'OGPages';
$result = og_user_roles_checkview($viewname, $current_view->args);
if ($result == 1) {
print t("<p> </p>");
print t("<hr>");
print t("<h2>" . l('Pages','og/ogpages/' . $current_view->args[0]) . "</h2>");
print t("<hr>");
$view = views_get_view($viewname);
print views_build_view('embed', $view, $current_view->args, 2, 6);
}
print t("</td>");
print t("<td valign='top'>");
$viewname = 'OGNews';
$result = og_user_roles_checkview($viewname, $current_view->args);
if ($result == 1) {
print t("<p> </p>");
print t("<hr>");
print t("<h2>" . l('News','og/ognews/' . $current_view->args[0]) . "</h2>");
print t("<hr>");
$view = views_get_view($viewname);
print views_build_view('embed', $view, $current_view->args, 3, 6);
}
print t("</td></tr>");
print t("<tr><td valign='top'>");
$viewname = 'OGBlogs';
$result = og_user_roles_checkview($viewname, $current_view->args);
if ($result == 1) {
print t("<p> </p>");
print t("<hr>");
print t("<h2>" . l('Blogs','og/ogblogsexpanded/' . $current_view->args[0]) . "</h2>");
print t("<hr>");
$view = views_get_view($viewname);
print views_build_view('embed', $view, $current_view->args, 4, 6);
}
print t("</td>");
print t("<td valign='top'>");
$viewname = 'OGVideos';
$result = og_user_roles_checkview($viewname, $current_view->args);
if ($result == 1) {
print t("<p> </p>");
print t("<hr>");
print t("<h2>" . l('Videos','og/ogvideos/' . $current_view->args[0]) . "</h2>");
print t("<hr>");
$view = views_get_view($viewname);
print views_build_view('embed', $view, $current_view->args, 5, 6);
}
print t("</td></tr>");
print t("<tr><td valign='top'>");
$viewname = 'OGForums';
$result = og_user_roles_checkview($viewname, $current_view->args);
if ($result == 1) {
print t("<p> </p>");
print t("<hr>");
print t("<h2>" . l('Forum Topics','og/ogforums/' . $current_view->args[0]) . "</h2>");
print t("<hr>");
$view = views_get_view($viewname);
print views_build_view('embed', $view, $current_view->args, 6, 6);
}
print t("</td>");
print t("<td valign='top'>");
$viewname = 'OGLinks';
$result = og_user_roles_checkview($viewname, $current_view->args);
if ($result == 1) {
print t("<p> </p>");
print t("<hr>");
print t("<h2>" . l('Links','og/oglinks/' . $current_view->args[0]) . "</h2>");
print t("<hr>");
$view = views_get_view($viewname);
print views_build_view('embed', $view, $current_view->args, 7, 6);
}
print t("</td></tr>");
print t("</table>");
print t("<hr>");
$gid = $current_view->args[0];
if (module_exists("og_vocab")) {
// First get the count of og_vocab terms for this group
$query = "SELECT count(*) FROM {term_data} td INNER JOIN {og_vocab} ogv ON td.vid = ogv.vid WHERE ogv.nid = %d";
$counts = db_query($query, $gid);
$n = db_fetch_object($counts);
$count = $n->{"count(*)"};
// If there is a count, then get the name(s) of the term(s)
if ($count > 0) {
$column = 0;
print "<table width=100% BORDER=1 CELLPADDING=5>";
print t("< col width=33% >");
$viewname = 'OGVocab';
$args = array();
$query = "SELECT name,tid FROM {term_data} td INNER JOIN {og_vocab} ogv ON td.vid = ogv.vid WHERE ogv.nid = %d ORDER BY td.name";
$names = db_query($query, $gid);
while ($item = db_fetch_object($names)) {
$args[0] = $item->tid;
$result = og_user_roles_checkview($viewname, $args);
if ($result == 1) {
if ($column == 0) print "<TR>";
print "<td valign='top'><hr><b>" . $item->name . "</b><hr>";
$view = views_get_view($viewname);
print views_build_view('embed', $view, $args, $item->tid, 10);
print "</td>";
$column++;
if ($column == 3) {
print "</TR>";
$column = 0;
}
}
}
if ($column > 0) print "</TR>";
print "</table>";
print t("<hr>");
}
}
?>
Now, adding on to dnosker's code, I have a place to put that link to the group home page that will always be present. Am I the only one bummed out by the fact that there's no Group Home Page link on the Group navigation menu?
<?php/*
* Create a link on the OG home page that links to a view of the OG content
* As per <a href="http://drupal.org/node/174563
" title="http://drupal.org/node/174563
" rel="nofollow">http://drupal.org/node/174563
</a> */
if (module_exists('og')) {
$group_node = og_get_group_context();
$gid02 = $group_node->nid;
$gid = (int)$gid02;
if ($gid02 === null) $gid = 0;
$output .= "<ul>";
$output .= "<div class=\"item-list\"><li><a title=\"Group Home Page\" href=\"http://www.mysite.com/node/$gid\">$group_node->title Home Page</a></li></div>";
$output .= "<div class=\"item-list\"><li><a title=\"Listing of Articles\" href=\"http://www.mysite.com/og/ogarticles/$gid\">Articles</a></li></div>";
$output .= "<div class=\"item-list\"><li><a title=\"Listing of Blogs\" href=\"http://www.mysite.com/og/ogblogs/$gid\">Blogs</a></li></div>";
$output .= "<div class=\"item-list\"><li><a title=\"Group Calendar\" href=\"http://www.mysite.com/og_calendar/$gid\">Calendar</a></li></div>";
$output .= "<div class=\"item-list\"><li><a title=\"Listing of Events\" href=\"http://www.mysite.com/og/ogevents/$gid\">Events</a></li></div>";
$output .= "<div class=\"item-list\"><li><a title=\"Listing of Images\" href=\"http://www.mysite.com/og/ogimages/$gid\">Images</a></li></div>";
$output .= "<div class=\"item-list\"><li><a title=\"Listing of Links\" href=\"http://www.mysite.com/og/oglinks/$gid\">Links</a></li></div>";
$output .= "<div class=\"item-list\"><li><a title=\"Listing of News\" href=\"http://www.mysite.com/og/ognews/$gid\">News</a></li></div>";
$output .= "<div class=\"item-list\"><li><a title=\"Listing of Newsletter Issues\" href=\"http://www.mysite.com/og/ognewsletters/$gid\">Newsletters</a></li></div>";
$output .= "<div class=\"item-list\"><li><a title=\"Listing of Photo Albums\" href=\"http://www.mysite.com/og/ogalbums/$gid\">Photo Albums</a></li></div>";
$output .= "<div class=\"item-list\"><li><a title=\"Listing of Pages\" href=\"http://www.mysite.com/og/ogpages/$gid\">Pages</a></li></div>";
$output .= "<div class=\"item-list\"><li><a title=\"Listing of Videos\" href=\"http://www.mysite.com/og/ogvideos/$gid\">Videos</a></li></div>";
$output .= "</ul>";
print $output;
}
?>
#17
That was some great code to share! Loved it!
You Wrote:
"Am I the only one bummed out by the fact that there's no Group Home Page link on the Group navigation menu?"
Yes! And that is just one of the reasons I ended up getting rid of Group Navigation Menu and replacing it with my own using the techniques above...
While we are all in the mood for sharing tips and tricks, here is another little thing I have done...
NOTE: I don't want to get off topic too much but the following is kind of a reverse of this thread which has some merit to mention. i.e. "create a link on NON OG pages that links to a users OG home page"
What I needed:
1... A menu on non group (normal site) pages that would have "My Group". This would be for the users Main group they wanted to be identified with.
2... Make it so that when a user logs into the system, they are taken to their main group home page.
So here is how I accomplished this. (Might be easier ways to do this but this works for me)
----------------
Main Group ID
----------------
This was pretty simple. I just added a field to profiles. "main_group_id". Then each user can simply have the node ID of their main group. Example: Main Group: 1325
----------------
For the menu:
---------------
I made a block that displays a few important items for users. This includes a log off link and a few other items. Most important is the link to the members main group page...
Block Description: Member Menu
Block Title: Member Menu
In the Block body goes my PHP CODE:
<?php
$home_group_url = "http://MYSITE.COM";
global $user;
if (!$user->profile_main_group_id == "") {
$home_group_url = "http://MYSITE.COM/node/";
$home_group_url .= $user->{profile_main_group_id};
}
// Create menu block
$output .= "<div class=\"content\">
<ul class=\"menu\">
<li><a title=\"My Main Group\" href=\"$home_group_url\">My Main Group</a></li>
<li><a title=\"My Account Settings\" href=\"http://MYSITE.COM/?q=user\">My Account</a></li>
<li><a title=\"Log Off The System\" href=\"http://MYSITE.COM/logout\">Log Out</a></li>
</ul>
</div>";
print $output;
?>
That takes care of having a little custom menu for the user that contains a link to their main group.
Now for the auto login to take them to that main group...
I simply use the "Login destination" module and in the settings to specify where exactly the user should be redirected upon login, I put the following
PHP CODE
<?phpglobal $user;
if (!$user->profile_main_group_id == "") {
$home_group_url = "http://MYSITE.COM/node/";
$home_group_url .= $user->{profile_main_group_id};
} else {
// go to the home page
$home_group_url = "http://MYSITE.COM";
}
return $home_group_url;
?>
NOTE: the "Login destination" module does not allow putting opening ?php and ending ?> ... I just put that here to auto highlight the block of code.
And there you have it! There is my little contribution for today. :)
-- Dave
#18
awesome!!!.... man this really helps in getting to next level of practical php--- great stuff - i am going to work through this ...this weekend- kudos for the thorough explanations
#19
Excellent instructions, Dave! Thanks so much for sharing that valuable snippet :)
#20
This would be fantastic if only I could get the Arguments section to allow me to add arguments. It's been really frustrating with the Views module that sometimes it doesn't give the appropriate options in the different sections. e.g. sometimes I can't add fields because there are no options to add them, other times I can't add arguments or filters, the forms just don't appear. AAAARRRRGGGGHHH!!
#21
I think I just need some more hints to understand the concept. Maybe you can help me. What did I do:
As you can see I've done something... for sure something wrong. What am I missing? Can anyone help me please?
#22
I noticed just one limitation with the appending the view URL with "og" method. Some of the OG views I created are set up to create tabs on the OG home page using the "node/$group/custom" approach, which is explained under the URL field on the View form. Changing this to "og/node/$group/custom" or "og/$group/custom" simply sends the user back to the main OG directory. If anyone knows of a means of keeping the tabs while also having the "More" connect correctly through Panels, I'd be interested in knowing.
On a related topic, I'm also looking for a means of placing the "Create Story", "Create Page", etc links in the header or footer of a view while also obeying the arguments it sends.
#23
We used OG and Domain module for our Malaysia Golf Portal.
We really need to improve the interface to something like myspace/facebook group interface. Currently just simply use the default view.
would like to try with panel2, views & OG.
#24
you know that you can do that now - with a little tweaking ---it is not a perfect solution but i have - just use node-groups.tpl.php to insert the panel page.....if you would like i can post the post the link - to the discussion on it....plus Moshe weitzman said that they is OG-panels module out there but I haven't seen it yet...may be he meant it was drupal 6
#25
Yes, please post it!
#26
http://drupal.org/node/173473 first one
http://drupal.org/node/166119 this is the one that completses the first
#27
#28
Automatically closed -- issue fixed for two weeks with no activity.
#29
subscribing
#30
subscribing
#31
To create a link to create content in the group, or a view header just do:
$group_node = og_set_group_context();$gid = $group_node->nid;
?>
<a href="/node/add/page?gids[]=<?php echo $gid; ?>">Add Page to group</a>
We have also used nice tricks to alert users to the fact that they are an admin for a group in the view header. Alternatively, that they haven't posted any content in the group that would show in that view (put this in the empty text for the view, modify for the header etc):
The group have not added any xyz_type nodes yet.<?php
//check we've got a group, rights to view the group, and of the right typ (if you have multiple group types)
if (($group = og_get_group_context()) && node_access('view', $group) && ($group->type == 'myogtype') ) {
//check current user is admin
if (og_is_node_admin($group)) {
$group_id = $group->nid;
$message_out = "You are a Group Admin. <br>Your group have not entered any pages of this type yet. <a href=\"/node/add/page?gids[]=$group_id\">Add your first Page</a>.";
drupal_set_message($message = $message_out, $type = 'error');
}
}
?>
#32
Genius. Just genius.
Thanks, many, many, MANY THANKS Dave!!!
Your explanation was clean, clear, and effective. It works like a charm.
Thanks!!
Rosamunda
#33
great tutorial!
just one question: what about breadcrumbs?
when i'm on a grooup post i correctly see: "groups>group>"
when i click on the stories i lost the group context (i see only "groups")
i think that i should see "groups>group>stories"
what do you think?
#34
Breadcrumbs are a nightmare with views. We solved the problem for nodes with the custom breadcrumbs module, however, for the views we are still working on it! If anyone can suggest a link, I'd be very grateful, but this discussion in the Custom Breadcrumbs issue queue suggests nobody has it yet: http://drupal.org/node/215475
#35
Subscribing.
#36
Thanks for posting this. Very applicable to a project I am working and that I've been battling with understanding how to make it work. So, so thankful!!!
- Dan
#37
Changed title back to original. Sorry about that.
#38
subscribing
#39
This is some excellent stuff. Thanks for sharing the recipe ldway. While on the subject of custom menus, you have shown us how to link to new pages of a content type. How about the link format for pages already generated by og itself? I'd like to throw away the og menu completely. Most specifically, I'm interested in the link format for the group's homepage, the invitation page, the forum page and the members page. I'd like to mix these into my menu for custom contact I created using your recipe above. Thank you very much for the help! Cheers, Kevin
#40
I just want to add that it is not necessary to set the views path to og/something/%.. I use groups/%/stories and then the pathauto for stories is something like groups/[group-id]/stories/[nid]
This way is easier to set the breadcrumb using the path.
#41
subscribe
#42
The solution in #9 looks like it almost exactly covers what I want to do but I have an additional issue which I'm unsure about.
I am using the subdomain module to assign each organic group to it's own subdomain i.e. to get to group1 you go to group1.example.com and to get to group2 you go to group2.example.com.
As this thread has discussed, I would like views for listing each content type within the current group, but I would preferably like to get to them via links like group1.example.com/news, group1.example.com/letters and group1.example.com/events.
However, from #9:
This makes it sound like what I'm trying to achieve is impossible. Any ideas?