CMS Development

subin
Top Contributor | Gold Partner
Top Contributor | Gold Partner

How can I edit the comment box on my COS Blog?

SOLVE

Hi all,

Can anyone show me how to edit the "reply to"  text on blog comments section. its not able to edit this section for the blog templates,

image-1484806196610.png

 

Thanks

 

0 Upvotes
1 Accepted solution
AngelaHicks
Solution
HubSpot Alumni
HubSpot Alumni

How can I edit the comment box on my COS Blog?

SOLVE

Hi Subin,

 

The "reply to" is the one thing that cannot be edited since it's not a part of the actual form. This is something that we're considering changing, but it's not possible at this time. I've sent over your example to our development team. Thanks for sharing that this is something that you need for your blog!  

Best,
Angela | HubSpot Academy

View solution in original post

0 Upvotes
11 Replies 11
gglorian
Participant

How can I edit the comment box on my COS Blog?

SOLVE

You can get the comments like this: in the blog-comments.html that you render with:

blog_comments "blog_comments" overrideable=True, label='Blog Comments', skip_css=False

you can acces all comments witha for loop like so:

for comment in comments
to get the first level comment look at comment.thread_id (something like 0000.0000.etc...
you should care about the second set of number that is always 0000 if it's a first
level comment, personnaly i did:
{% set comment_threads = comment.thread_id|split('.') %}
{% do comment_threads.pop(0) %} // remove first set of 0000
{% set first_level = comment_threads|first == '0000' %} // true if first level comment
the comments are in the order you want so you only have to handle html classes +
css to display differently if first_level is true or not like this
{{ first_level ? 'first-level' : 'second-level'}}
you also need to attach this to the comment container (first parent)
id="'c'~{{comment.thread_id}}" data-threadid={{comment.thread_id}} (target for hs js)
endfor
 
of course set the ugly comments to display none with:
#comments-listing
display: none;
 
 
I'm currently trying to overrid hs JS to provent ?success=true to pop in params because
user can't see his comment apear without reloading page
0 Upvotes
arinker
Top Contributor | Partner
Top Contributor | Partner

How can I edit the comment box on my COS Blog?

SOLVE

Hi subin,

since the html of the reply button is:

 

<button class="comment-reply-to hs-button secondary">
    "Reply to "
    <em>Firstname Lastname</em>
</button>

you can alter the text with a little script:

 

 

$( window ).load(function() {
    var $reply = $('button.comment-reply-to');
    var $em = $reply.find('em'); 
    $reply.html('responder a ');
    $reply.append($em);
});

This is some kind of "hacky", but it solves your request for the time being. Sure it would be nice to have that editable the "normal" way.

Design Manager   HubSpot.png

Best,

 

Arno

 

0 Upvotes
Tushar1
Participant

How can I edit the comment box on my COS Blog?

SOLVE
0 Upvotes
AngelaHicks
HubSpot Alumni
HubSpot Alumni

How can I edit the comment box on my COS Blog?

SOLVE

Hi Subin,

 

I know this can be confusing! However, the blog comment module is, at its core, just a form. Navigate to Contacts > Forms and your looking for a form named something like Blog Comments Form. You'll be able to edit the text there, publish the form and it will update all of your blogs using that form for comments in the blog. Let me know if I can be of further assistance! 

 

Best,

Angela

Best,
Angela | HubSpot Academy
subin
Top Contributor | Gold Partner
Top Contributor | Gold Partner

How can I edit the comment box on my COS Blog?

SOLVE

Hi @AngelaHicks

 

Thanks for your comments, i have gone through the Contact Form but i cant find "Reply to" section with in the form there are only options to edit the form labels and placeholders. 

reply to.png

Thanks

0 Upvotes
AngelaHicks
Solution
HubSpot Alumni
HubSpot Alumni

How can I edit the comment box on my COS Blog?

SOLVE

Hi Subin,

 

The "reply to" is the one thing that cannot be edited since it's not a part of the actual form. This is something that we're considering changing, but it's not possible at this time. I've sent over your example to our development team. Thanks for sharing that this is something that you need for your blog!  

Best,
Angela | HubSpot Academy
0 Upvotes
louischausse
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

How can I edit the comment box on my COS Blog?

SOLVE

2 years later, is it something that can be done by now?

 

Thanks

Louis Chaussé from Auxilio HubSpot Solutions Partner Signature
Louis Chaussé from Auxilio HubSpot Solutions Partner Meeting link
0 Upvotes
ThomasReitz
Participant

How can I edit the comment box on my COS Blog?

SOLVE

Hi Angela,

I think we've discovered an additional bug: If a visitor comments and confirms that he wants to be informed, that someone has replied to his comment, he automatically gets an email from noreply@hubspot.com, which – as far as I know – can't be edited or customized for the individual website.

 

Best regards

Tom

AngelaHicks
HubSpot Alumni
HubSpot Alumni

How can I edit the comment box on my COS Blog?

SOLVE

Hi Tom, 

 

Can you post your Hub ID here, so I can take a look? 

Best,
Angela | HubSpot Academy
0 Upvotes
ThomasReitz
Participant

How can I edit the comment box on my COS Blog?

SOLVE

Hi Angela,

the ID of the Portal would be #2119559. I didn't tested this on other portals so far, so I'm not sure if thats a problem in general or a bug in this specific portal.

 

Thank you

Thomas

0 Upvotes
AngelaHicks
HubSpot Alumni
HubSpot Alumni

How can I edit the comment box on my COS Blog?

SOLVE

Thanks, Tom. 

 

Definitely get in touch with our Support team so they can investigate. As a paying customer you can contact support via the Help button in your portal and pick how you'd like to be contacted. 

 

They'll be able to get to the bottom of this!

 

Best,

Angela 

 

Best,
Angela | HubSpot Academy
0 Upvotes