Hey all,

I'm trying to create a list of my site's users with links to their blogs. These blogs are at sitename/blog/username. I've been battling over this for two days now and starting to run out of hair to pull out of my head, so please, if you've got any advice, please share.

My objective: A list of users with links to their blogs, preferably so that the link is in their username.

My setup:

  • A Views Page with Content, Type: Blog entry
  • Aggregation on to show only one row per user
  • Relationship: Content: Author
  • Fields: (relating to above) User: Name and COUNT(Content: Nid) for count of posts

What I've tried:

  • Using the Relationship: User: Representative Node, which resulted in an SQL error (SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.uid' in 'where clause'). Some users seem to have gotten rid of it by updating References module, but this did not do anything for me. Instead, I changed views/module/user.views.inc so that in the sections commented //uid I replaced "users" with "node", after which the error disappeared. I then added Content: Add link with relation to the representative node, but noticed that the links directed to all content types, not just blog posts, so some users had for example links to their latest news items.
  • I found a trick to show only one piece of a certain content element without representative node. Choosing Field: Content: Body for example, and setting aggregation mode to MAX, it seems to pick out the last one only. Alas, this does not work for Content: Add link, so no luck there
  • I would not like to use Views Field View as I understand that it's quite rough on site performance
  • I found out that you can override for example the link in Field: User: Name, but did not manage to find a way to use some sort of a token for the username (this would be the simplest way to do this, so that I could just override the user account link with "blog/[username-token]"

So, as said, any help would be greatly appreciated!

Comments

dawehner’s picture

So what about a view of users and a global: custom field with a link to . "sitename/blog/username", else i would suggest you to use views_field_views

MustangGB’s picture

Status: Active » Closed (outdated)