When I output a node's comments in a pane in panels I don't get the nifty little anchor on the page so that I can go to example.com/node/4324#comments

If the output is run through theme_comment_wrapper() in the comment render function - core will put a <div id="comments">content here.. </div> around the comments and I guess most themes will do the same.

Here is a patch that runs the comments through the theme function.

CommentFileSizeAuthor
#6 908104-6.patch2.75 KBnaxoc
#4 908104-3.patch2.66 KBnaxoc
comments_theme.patch753 bytesnaxoc

Comments

naxoc’s picture

Status: Active » Needs review

Woops, setting status

merlinofchaos’s picture

Status: Needs review » Needs work

The theme_comment_wrapper was left out on purpose because it is often not desirable. For example, Garland adds text there that you may not want, and cannot get rid of if it is run through that theme. I'd much rather an option in the config of the pane added the anchor or something.

naxoc’s picture

Status: Needs work » Needs review
StatusFileSize
new2.66 KB

An option makes a lot of sense. Here is a patch with that.

The anchor is not on by default because of backwards compatibility. I do think that a lot of modules rely on the fact that the anchor is there though, so maybe it should be on as default?

merlinofchaos’s picture

Perhaps on by default for new panes, and off by default for already existing panes that have not had the setting?

naxoc’s picture

StatusFileSize
new2.75 KB

Good idea - here is a patch that does that.

merlinofchaos’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)

Committed to D6; needs porting to D7, I'm sure this patch won't apply by itself, or at least, won't work right even if it does.

merlinofchaos’s picture

Status: Patch (to be ported) » Closed (duplicate)

All of the 'to be ported' patches got merged in during the porting sprint in September.