ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Including a Bloggers name in the URL

July 10, 2008 3:39am

Subscribe [3]
  • #1 / Jul 10, 2008 3:39am

    Nirada

    24 posts

    I am setting up a blog site in EE. This site has 15 different people with their own blogs, and it has been decided that the blog name will be included in the URL. For example:

    http://www.example.com/blogs/bloggers-name/article-title

    So, a post called “My Latest Blog Article” by Steve would appear as:

    http://www.example.com/blogs/steve/my-lastest-blog-article/

    The default behavior in EE doesn’t seem to support this out-of-the-box. The only way I can think to achieve this is to make a new Weblog named after each blogger and then create one template in the “blogs” template group for each one of them.

    Of course, I could probably avoid making a template for each blogger by making one fits-for-all template which accesses the {segment_2} variable. Ideally, though, I would only want to have to make one fits-for-all weblog, too. I can’t really see an obvious way to do this, keeping each bloggers blog separate, though.

    Any ideas? 😊

  • #2 / Jul 10, 2008 4:21am

    Ingmar

    29245 posts

    Ideally, though, I would only want to have to make one fits-for-all weblog, too. I can’t really see an obvious way to do this, keeping each bloggers blog separate, though.

    Why not simply filter by username? And using a url_segment would be a very good idea here, I think.

  • #3 / Jul 10, 2008 4:30am

    Nirada

    24 posts

    Why not simply filter by username? And using a url_segment would be a very good idea here, I think.

    Ok, thanks Ingmar, this would probably work for the majority of the blogs we have. However, something I forgot to mention is that a couple of the bloggers have more than one blog, under different names. For example, Steve has his own blog and also “Steve’s Tips and Tricks”. What I’d like to do is have:

    http://www.example.com/blogs/steve/article-name

    and

    http://www.example.com/blogs/steves-tips-and-tricks/article-name

    ...both accessible by Steve from his own login. Creating two usernames for one user would not really be a great solution.

    I thought of making a custom field (a dropdown) with a list of all of the blog names in it… but that would make it too easy for one blogger to accidentally post something in someone else’s blog.

  • #4 / Jul 14, 2008 10:19am

    Nirada

    24 posts

    Anyone have any idea how to do this?? 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases