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.

carrying an extra segment, blog name, in URL

July 29, 2010 10:04am

Subscribe [3]
  • #1 / Jul 29, 2010 10:04am

    phoebe_reed

    82 posts

    Hi,

    Can you successfully carry both a weblog title and a weblog name in a URL so that you can then display that post, and you can grab the weblog title automatically, or from segment_x, and you can grab weblog name from segement_y?  I hve tried a number of times and failed.


    I have a URL for a listing of blog posts that looks like:

    ..siteinfo/show_all_template/this_weblog_name.

    The page uses “this_weblog_name” to pull the most recent 10 posts from the weblog.
    So far, so good.

    Then each blog post has a “read more” link, which points to:

    ..siteinfo/show_details/this_weblog_name/weblog_title

    I get an SQL error when I click on this link. I am assuming it is because when you are passing a weblog title in the URL, you can’t have other stuff in front of it? 

    So I tried reversing the title and the weblog name:

    ..siteinfo/show_details/weblog_title/this_weblog_name

    Same SQL error.


    So my question is:

    How can I carry both the weblog title that needs to be displayed on this page, and ALSO, somewhere, the weblog name, so that my {exp..} tag can say weblog={segment_4}, for example

    Thanks so much for any pointers!

    the only option I see is to create a separate template for each weblog, but there are 42 of them!  I want to make a “one template” solution for “full view” and have it know the weblog name and the title of the post.

    Thanks so much!

    Phoebe

  • #2 / Jul 29, 2010 8:01pm

    Brandon Jones

    5500 posts

    Phoebe,

    1. Which version and build of EE are you using?
    2. Do you have any extensions installed, and do you get the same behavior with extensions disabled via the green button in the Extension Manager?
    3. What SQL error are you getting specifically?

  • #3 / Jul 30, 2010 10:53am

    phoebe_reed

    82 posts

    Hi,

    I am using 1.6.9

    I don’t understand what happened, I am sure that I must have adjusted something.  But I just diabled extensions, made some adjustments to the pages, and it worked properly.  Then I turned back on extensions, and it *still* works.  So, for now, I think it’s good.

    The error was a bad query, and it said to read the documentation about proper formatting near [the url title of the post]. 

    So, not sure what was going on, but for now, it all works!  Thanks for your help.

    Phoebe

  • #4 / Jul 30, 2010 11:16am

    Ingmar

    29245 posts

    Glad to see it’s working for now. Just start a new thread should it break again 😊

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

ExpressionEngine News!

#eecms, #events, #releases