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.

Article ID URL's not working?

August 15, 2011 6:57am

Subscribe [3]
  • #1 / Aug 15, 2011 6:57am

    Pauly

    16 posts

    When accessing URL’s directly at channelname/article-ID, for example articles/8, the article is no longer visible. The article must be accessed directly via articles/article-name. I’m not sure if this is intended bu it’s most certainly not desired. How can I change/fix this?

    EE Info: v2.2.1 - Build: date 20110705

  • #2 / Aug 15, 2011 10:38am

    Ian Ebden

    312 posts

    Sounds odd. Any chance you could post the channel entries tags you’re using on your articles page?

  • #3 / Aug 15, 2011 3:39pm

    Pauly

    16 posts

    Just you mentioning that, I was able to find my problem. I had url_title=”{segment_2}” in my channel entries tag. If I want to use this though, how would I also make sure it work for the article ID?

  • #4 / Aug 15, 2011 4:16pm

    Ian Ebden

    312 posts

    You shouldn’t need to use the url_title parameter at all. Just use the params dynamic=“yes” and limit=“1”, and you’re all set. Hope that helps.

  • #5 / Aug 15, 2011 4:18pm

    Dan Decker

    7338 posts

    Hi Pauly,

    Let’s see if we can get this figured out. You have a channel named “Articles”, correct? Channels, by default, do not have a direct access URL as you describe. Did you set a value for that option in the Channel’s preferences? Do you have a template group named “articles” as well? ExpressionEngine URLs are typically fashioned http://example.com/index.php/template_group/template/entry_id for example.

    In the example URL you provided you are asking ExpressionEngine to serve the template “8” form the “articles” template group. With a little more information about your setup, we should be able to help you achieve the results you desire.

    Cheers,

  • #6 / Aug 16, 2011 3:47am

    Pauly

    16 posts

    Ian, thank you for your help. This does help.

    Dan, this is correct, I have a channel named Articles, which is driven by a template at articles/index. I am using a single template to drive 4 sections of the channel as to achieve my desired URL’s. So for example I have /articles/tag/category-name for category view, then /articles/tag to list my categories, then /articles/entry-name for entries and finally /articles for top level.

    Removing the url_title=”{segment_2}” has fixed the problem I was having 😊

  • #7 / Aug 16, 2011 5:27pm

    Sue Crocker

    26054 posts

    Glad you found a solution. If anything else comes up, please do let us know in a new thread..

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

ExpressionEngine News!

#eecms, #events, #releases