Blog.BlogComment Message Template

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 年 前
Question ...

I was testing the Blog comment Message template via email , and I had a Blog Post titled as:

2" x 4" x 8' Lumber

In the Blog.BlogComment Message template, I altered the following to include a link to the Blog post itself:

A new Blog comment has been created for the "%BlogComment.BlogPostTitle%"  post.

Where comment is bolded, I used %Store.URL%%BlogComment.BlogPostTitle% for the underlying URL address.

When the email was sent, in the message, the link for comment looked like the following when I rolled my mouse pointer over it:

http://127.0.0.1:5000/2%22 x 4%22 x 8' Lumber

When it went to my browser (Firefox), the link was interpreted as the following:

http://127.0.0.1:5000/2%22%20x%204%22%20x%208'%20Lumber

Note: I was able to catch it like that because in the original email message, I had the StoreURL set as http://localhost/ and then changed it to http://127.0.0.1:5000/

But with either StoreURL, the link above in the browser's address bar still resulted in:

http://127.0.0.1:5000/page-not-found

(I hope I documented these things correctly.)

Should I avoid using quotes in Blog post titles?
1 年 前
PunkyDogGear wrote:
... I used %Store.URL%%BlogComment.BlogPostTitle% for the underlying URL address. ...  Should I avoid using quotes in Blog post titles?

I don't think it will work anyway.   The "title" is not part of the URL.  If you edit a Blog, at the bottom you will see the SEO section.  Note the field "Search engine friendly page name".  By default it will generate the page part of the URL - e.g. in your example it generates:  2-x-4-x-8-lumber
(i.e. "-" for spaces, and removes other special characters).

It may be possible that you can put in there your:  2%22%20x%204%22%20x%208'%20Lumber
(But I've not tried it.  And of course, it means that it's no longer a  "Search engine friendly page name", and you need to remember to make that "calculation" every time you create a new blog).

What you need is a (e.g.,) BlogPostSlug message token, which would require customization.
1 年 前
Ah! That makes sense! Thanks New York! :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.