comment/reply-related suggestions

Created on 4 April 2012, over 13 years ago
Updated 3 July 2025, 10 days ago

Problem/Motivation

Currently, the "comment/reply" pages has a number of issues/inconveniences:

1. Node type can't be guessed by URL. If I have a content type Foo and, say, aliases set up as 'foo/nid', then the page of commenting has the same generic address of 'comment/reply/nid'. Thus, if I plan to, say, control that a given block be displayed on any Foo pages, I have no other choice but to add a clumsy PHP code to determine what node type it is and whether to display the block.

2. Theming for 'comment/reply' is inconvenient. An example: if I add a content type Foo with machine name 'foo' and create a template node--foo.tpl.php, I can also use comment--node-foo.tpl.php to theme comment output. Everything looks nice until I try to theme 'comment/reply' pages. In case of Drupal 7.12 I see that
- if node--foo.tpl.php exists, it's also used to theme 'comment/reply' page, but comment block is inserted *below* the above template output, thus I have to either use page--foo.tpl.php or other tricks to asssign required CSS classes/ids/whatever.
- comment--node-foo.tpl.php isn't used for 'comment/reply' pages

I can use page--comment--reply.tpl.php, but I will have a lot of fun determining what node type is being commented and I will have to insert the proper template manually.

Proposed resolution

1. 'comment/reply' should use the comment templates (comment--node-type.tpl.php and comment-wrapper/tpl/php), if available for the node type being commented
2. An alias should be allowed to create to allow to insert node type machine name/other unique string into the URL (i.e. nodetype/comment/reply/nid)
3. The comments/commenting form in 'comment/reply' pages should be inserted wherever code like
print render($content['comments']);
is used

Remaining tasks

1. This issue was added years ago. It should be tested to see if it still applies.
2. Discuss/determine if this feature is really wanted.

User interface changes

Block styling should be easier as per 1. in the problem.

API changes

TBD (Theming might need to be changed)

Data model changes

None.

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

comment.module

Created by

πŸ‡·πŸ‡ΊRussia Konstantin Boyandin

Live updates comments and jobs are added and updated live.
  • Needs backport to D6

    After being applied to the 7.x branch, it should be considered for backport to the 6.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for sharing your idea for improving Drupal.

    We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024