recipe for a social learning platform - navigation
Posted by: admin in site_development, tags: blogging, drupal, eduglu, featuritis, feed aggregationI’m trying out a navigation solution to my featuritis dilemma. As I’ve got 3 major features on my site - [1] a community blog, [2] aggregated news feeds, and [3] an aggregation of forums postings from selected forums in an associated Moodle course support platform (I’ll describe this, and the reasons for it, in a subsequent post) - each with multiple views - the comprehensive navigation for all 3 features together was growing cumbersome, with a rather lengthy side column of menu blocks.
So - I’ve created a front welcome page using a “Page” node, with a menu block linking to each of these 3 sections of the site; and added links as well to my 3 sections in the “primary” menu, which displays below the header on all page views.
The side-column menu blocks relating to the Community Blog should show up on the various views of the Community Blog “section” of the site, but should not show up on the views relating to Aggregated News or the Aggregated Forums, & v/v. To accomplish this, I’ve set up custom block visibility for these views.
On the Blocks Administration page, to manage block visibility, click on the selected block’s configure link. At Show block on specific pages:, select Show if the following PHP code returns TRUE (PHP-mode, experts only). Paste in the equivalent of:
<?php
$match = FALSE;
$types = array(’blog‘ => 1);
if (arg(0) == ‘node’ && is_numeric(arg(1))) {
$nid = arg(1);
$node = node_load(array(’nid’ => $nid));
$type = $node->type;
if (isset($types[$type])) {
$match = TRUE;
}
}
$url = request_uri();
if (strpos($url, “blog/“)) {
$match = TRUE;
}
if (strpos($url, “tagadelic/list/1“)) {
$match = TRUE;
}
return $match;
?>
The first criterion - $types = array(’blog‘ => 1); - will include this block on all single-node pages where the node is a blog entry.
The second criterion - if (strpos($url, “blog/“)) { - will include this block on all pages where the URL contains the string blog/. I’ve set up the various Views of the community blog, in their Views settings, to have the url blog/… (e.g., blog/communityblog_listview, &c.).
The third criterion - if (strpos($url, “tagadelic/list/1“)) { - will include this block on the tagadelic tag-cloud page that lists my blog-specific taxonomy (but will not include it on the tagadelic pages displaying taxonomy specific to news aggregation &c.)
This was repeated for each of the side blocks that I want to see displayed on the Community Blog related pages of my site; these will now show up when the user is navigating through pages related to the Community Blog, but will not show up if the user is in other “sections” of the site.
Side-column menu blocks for the other sections of the site are similarly configured, to display menu items specific to the News section only on the pages dealing with aggregated news, &c.
I like it - it works ;^)
Table of contents for social learning site
- recipe for a social learning platform - #1
- recipe for a social learning platform - #2 - demo site
- recipe for a social learning platform - #3 - site & core modules
- recipe for a social learning platform - #4 - additional modules
- recipe for a social learning platform - #5 - modules hacks
- recipe for a social learning platform - #6 - social rated news
- recipe for a social learning platform - #7 - theme
- recipe for a social learning platform - #8 - login & access
- recipe for a social learning platform - #9 - views
- recipe for a social learning platform - #10 - no social rating?
- recipe for a social learning platform - #11 - files repository
- recipe for a social learning platform - #12 - distributed content
- recipe for a social learning platform - #14 - news feeds
- recipe for a social learning platform - #15 - surfacing algorithms
- recipe for a social learning platform - #16 - surfacing algorithms - node cloud
- recipe for a social learning platform - #17 - news feeds take two
- recipe for a social learning platform - #18 - making it social
- featuritis
- recipe for a social learning platform - navigation



Entries (RSS)