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.

Notification: entry_id instead of url_title

July 18, 2007 10:29am

Subscribe [3]
  • #1 / Jul 18, 2007 10:29am

    Lasisto

    5 posts

    In the notification template for new comments there’s the variable {comment_url}. Using this variable I get a link which contains the url_title of the weblog entry the comment refers to, but I don’t like url titles in general. Is there a way to get a link with the entry_id in the notification e-mail? This would be wonderful.

  • #2 / Jul 18, 2007 10:38am

    Robin Sowell

    13255 posts

    Took a look at the code- that variable is replaced by the posted RET field.  You can’t set that via parameter, but if two fields are in a form and have the same name?  The second field is the one that counts.  So- haven’t tried this, but- add a hidden field:

    {exp:comment:form preview="weblog/preview"}
    
    <input type="hidden" name="RET" value="{path="site/test"}{segment_3}/" />

    That assumes the third segment has your entry id in it.  Untested, but give it a try.  (Also, might make a good feature request to add this in.)

  • #3 / Jul 18, 2007 10:46am

    Derek Jones

    7561 posts

    That’s not necessary as the current URI will be used to form the RET value in the form.  In other words, if you are on an entry id based single entry page, it will already have the entry id and not the URL title, and vice-versa.  If you are not seeing that behavior, do you have any extensions installed?

  • #4 / Jul 18, 2007 11:47am

    Lasisto

    5 posts

    The comments are posted from a entry_id based single entry page, but the user notification shows the url_title. The link in the administrator e-mail is right, the link reflects that I was coming from an entry_id based page. So, one notification works as expected the other one does not.

    No extension installed.

  • #5 / Jul 18, 2007 12:04pm

    Derek Jones

    7561 posts

    Do you have a link, dk?  Both the user and admin notification use the URI to form the {comment_url} variable.  And as a followup, what version and build are you running?

  • #6 / Jul 18, 2007 12:20pm

    Lasisto

    5 posts

    We use 1.6 build 20070708. I send you a pm with the login data - the site is not public yet.

  • #7 / Jul 18, 2007 12:46pm

    Derek Jones

    7561 posts

    Your form fields are correct, so I cannot guess why this is happening.  Can you email me FTP and super admin control panel access so I can have a closer inspection?

  • #8 / Jul 18, 2007 12:59pm

    Derek Jones

    7561 posts

    Ok, I see, you are moderating comments, so the form data doesn’t enter into it.  With moderated comments, the URL title will always be used; feel free to place a Feature Request to allow the use of entry id URLs in this situation.

  • #9 / Jul 18, 2007 1:04pm

    Lasisto

    5 posts

    Thanks Derek, I place a feature request.

  • #10 / Sep 12, 2008 11:10am

    Davor

    114 posts

    I year later,, I have the same “problem”.

    Will check a feature request.

    davor

  • #11 / Sep 12, 2008 11:17am

    Robin Sowell

    13255 posts

    You’re fast, Davor.  For anyone else looking- the FR thread.  It’s the best way to handle this one.

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

ExpressionEngine News!

#eecms, #events, #releases