0

I want to use ajax-links-api so that when someone replies to a comment, the url comment/reply/60/51 is loaded with ajax on the current page.

I need to add rel="a class" on the reply link's anchor, to select witch div to load.

enter image description here

Display suite adds a manage display for comments

Is there a template file I can use to change the html for the comments field "links"?

Update

By Installing Devel and adding the block I see the comment wrapper Devel

The template in modules/comment/comment.tpl does not look to have the html for links in it.Comment Template

  • install the devel module and assign the Development block in somewhere. then in theme regsitry look for comments. if it is not there you need register the comments in the theme registry then you will be able to add HTML to it. – M a m a D Jun 11 '14 at 15:50
  • Installing devel gets me further, but can you please take a look at the updated question. – sasdev Jun 12 '14 at 9:08
  • Do you know how to register a theme in theme registry? – M a m a D Jun 12 '14 at 9:31
  • No idea. Can you give me some basic detail of what needs to be done? – sasdev Jun 12 '14 at 9:39
0

Why don't you use the default selectors to get the url? some thing like this:

(function($) {
    $(document).ready(function() {
        $("YOUR-COMMENTS-WRAPPER").find('a').click(function(){
             var url = $(this).attr('href');
        });
    )
    });
})(jQuery);

then use the url to load the DIV

  • using a script to add the necessary classes is the only solution I could find. – sasdev Jul 7 '14 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.