How do you create a view block that only displays content related to a particular scholar site?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
eärendil's picture

I want to put a block view sitewide across every user's scholar site, except only have it show particular content related to that user (in this case, a hi resolution image of the user).

What is the best way to do this in Open Scholar via Views? Or is there a better way?

Comments

Interested

munyiva's picture

I created a custom content type for my scholar sites and tried without luck to do this. I will be really interested to see how this can be done.

Add the "Current Space" filter

rbrandon's picture

If you look at any of the existing views you will see that they all have the "Space: Current Space" filter. This filters the content to just content in the current site.

User related content

munyiva's picture

What if the content relates to the user who owns a site? for example some data from the user profile?

This is just a guess, since I

humansky's picture

This is just a guess, since I haven't done it, but perhaps you can use the "Node: Content Profile" relationship (or something similar) in the view and extract the fields using that relationship.

Still Not Working

eärendil's picture

Thanks for the help everyone and I think we are heading in the right direction, but still can't get it to show correctly. When I use the Node: Content Profile relationship and the Space: Current Space filter, my output still doesn't seem to work. I use the field "site_logo" (which is usually used as the site user's profile pic) just to test to see if it would show correctly. The view block should only show the site logo associated with that scholar site.

Any continued help would be appreciated - Thanks!

Chad

Can you elaborate a bit more

ferdi's picture

Can you elaborate a bit more about what you are trying to do. Do you need an image for each user or each site (site logo ?).
In case of users, can you clone the view at yoursite.com/asite/cp/users and add the users photo ?

What I am doing:

eärendil's picture

Hey Ferdi - thanks for the reply.

I want each person who creates their own "Scholar Site" to be able to also upload a high resolution photo of themselves (that outputs only as linkable text, as opposed to just displaying the whole image) and have it output below the "site_logo" image on their scholar site.

At first I thought about customizing the "single image" block that you can use in the Control Panel of each site so that it outputs the image as just linkable text. But, then I realized someone might also want to add a single image that does print out the whole image.

I thought a view block would be the way to go, but I am open to other solutions.

Thanks again for your help.

just to clarify

eärendil's picture

I can get the block to show up site-wide (ie. on every scholar site), I just can't get it to display the content related to that particular scholar site (i.e. the high resolution image).

Thanks!

I think I found a solution

eärendil's picture

http://drupal.org/node/711354

5

Add argument node:nid >> Provide default value >> Current group node by context

Worked for me.

OpenScholar

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week