I was thinking that MySite is nice because each user can add feeds globally and have a page to share, individually, what they like as a whole. Then I thought about making a MySite page the front page, because the formats are nice, clean, and simple to style and can act as a site aggregation page. Two problems arise. 1.) The breadcrumbs show "Home -> MySite...", bad for a homepage. 2.) Each MySite has a link to each profile...which is awesome. Also bad for a homepage...though. Is there anyway to style a sitewide MySite page that doesn't have the aforementioned stuff. Any ideas? Can this be done already? Am I missing something? Of course, I can use the news aggregator page...but MySite is more flexible and prettier to look at. Thanks.
cheers,
larry
Comments
Comment #1
agentrickardThe 'Home > MySite' breadcrumb trail is a default function applied by Drupal's menu system, so I won't fix that. What you can do is create a template for MySite that doesn't print the $breadcrumb value.
See the discussion of 'creating a new admin theme' at http://drupal.org/node/52389. Change 'admin' references to 'mysite,' and then create a page-mysite.tpl.php. (Simply copy page.tpl.php and remove the 'print $breadcrumb' lines).
As for printing the profile link, that is handled in the MySite layout files (default.php and columns.php) and is designed for people other than the user to see. It exists inside a t() string, so you have two options. 1) Comment out that output from your copy of the layout (line 21 in columns.php, line 15 in default.php), or 2) use translation locaization to make that string null. (Hint: #1 is easier).
Of course, I could put a check into the layout files that says "Is the user looking at this page the owner of this page? If not, print this link). That seems to be a good (and simple) fix.
Comment #2
agentrickardAlso note that the layout files are actually theme functions. The problem is, they are all the same theme function, since only one gets included for each MySite page view.
If you only allow one layout (default, say), and remove the columns.php file, you could use Drupal's theme override functions to change the this.
Comment #3
agentrickardThe fix for this is likely to make the layout files define separate theme functions and alter the layout loading code.
This would allow for template-level theme overrides along Drupal standards.
Comment #4
larry commentedI appreciate the in-depth responses. Actually, I was wrong on the breadcrumbs. Mysite does not print them when a mysite page is used as the front page. MySite is the only module (and I've tried many) that does not do this...awesome...that problem solved. However, the profile link does show. What I'm thinking is this.
I want to offer mysite pages to every registered member...leaving each page formatted as is. However, I want to use one and only one mysite page as a default "site" mysite page that allows me to enter the feeds I want on the front page. I can create a new theme and stick it in the "styles" folder...no worries there. However, the profile link will still show...which I do not want others to see.
Here are a couple of scenarios as a solution.
1) Put in a permission check so that only unregistered users can't see it...once registered they can. If this is used...how?
2) Put in a permission check based on theme. So the "blue" theme won't show the link, but "red" and "default" will. If this is used...how?
Am I thinking in the right direction or not? I'm just looking at some minimal alteration so I can make a front page that would be representative of the site...without a profile link. Are my suggestions easily doable?
Thanks again.
cheers,
larry
Comment #5
agentrickardLet me clarify a few items that seem unclear in your post.
1) To make 'your' MySite page the default homepage, go to 'admin/settings' and set Default frontpage to be 'mysite/YOUR_UID/view' (just be sure your MySite page is set to be publicly viewable).
2) MySite doesn't print a breadcrumb because of default menu behaviors. I didn't do anything special.
3) Styles just refer to .css stylesheet includes (blue, red). Themes control the display of different page elements (title, byline, teaser). Layouts control the presentation of the entire page area and are where the profile link gets added. You have a few options here.
3a) The profile link isn't in a div class (it just says, div align=right). If we put it in a class, you could hide that div using CSS. That should become div class='profile-link'.
3b) Just comment out that line in your local copy.
3c) The permission check would either go in the layout file (if $user->uid > 0) print this (/end if) or as a setting in the user's MySite page -- 'Show profile link.' It does occur to me that that link should probably respect the 'access user profiles' permission from the user module. So that's probably a bug.
Personally, I would just use #3b -- it's the fastest solution until the following changes get made:
---
The first two are bugs which will get fixed for 4.7.
Item #3 on that list is a feature, to be implemented in Drupal 5, which begs to have a profile.inc file to handle the inclusion of user profile data on MySite pages.
Comment #6
agentrickardFixed 9-Nov-2006
Comment #7
agentrickard