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.

Using {entry_date} in the Comment Page URL Channel Preferences Field

September 13, 2012 12:38am

Subscribe [1]
  • #1 / Sep 13, 2012 12:38am

    Chad Clark

    20 posts

    Hello,

    I am building a site with “non-standard” EE URL structures. I am inserting the year and month into my URLs like:

    http://mysite.com/section/2012/10/url-title

    When setting the value for “Search Results URL” in the Channel Preferences, I am using:

    /section/{entry_date format='%Y/%m'}/

    as the path, dynamically building the correct year/month.

    In my templates, I am attempting to use:

    {comment_url_title_auto_path}

    It appears this is not parsing and links are returning URLs like:

    http://mysite.com/section/{entry_date format='%Y/%m'}/url-title

    Is it possible to use dynamic code in the Channel Preferences fields?

  • #2 / Sep 14, 2012 4:46pm

    Kevin Smith

    4784 posts

    Hi Chad,

    No, I’m afraid it’s not possible to use template code in the Channel Preferences, and I’m not sure it’s otherwise possible to do what you’re looking to do here. The only thing I could think of would be to create a custom add-on that will detect the entry in question based on the URL title in the URI and then redirect to the kind of URL you’re looking for based on the year and month of the entry date.

  • #3 / Sep 18, 2012 12:07pm

    Chad Clark

    20 posts

    Hi Kevin,

    Alright, good to know. Thanks for your reply.

  • #4 / Sep 19, 2012 5:41pm

    Kevin Smith

    4784 posts

    Glad I could help, Chad. Anything else I can do for you?

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

ExpressionEngine News!

#eecms, #events, #releases