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.

url segments

June 18, 2008 2:59pm

Subscribe [1]
  • #1 / Jun 18, 2008 2:59pm

    Silencio

    46 posts

    I’m setting up a template page for a weblog that will display weblog entries based on the url segments.

    I’d like it to show one entry if the url is like:

    url.com/template/2008/06/18/entrytitle

    or, I’d like it to show multiple entries if the url is like any:

    url.com/template/2008/06/18/
    url.com/template/2008/06/
    url.com/template/2008/

    Can anyone share how they’ve achieved this?

    Thanks.

  • #2 / Jun 18, 2008 4:06pm

    Silencio

    46 posts

    I was trying to do this through php and global segments, when I just figured out that it’s built in.

    These 3 urls now work:

    url.com/template/2008/06/18/entrytitle
    url.com/template/2008/06/18/
    url.com/template/2008/06/

    With this code:

    {exp:weblog:entries weblog="{my_weblog}" url_title="{segment_5}" dynamic="on"}

    If anyone has another way, I’d be interested to know.

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

ExpressionEngine News!

#eecms, #events, #releases