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.
Comments
Comment #1
vm commentednew features based on feature request would go into drupal 8.x
7.x only accepts bug fixes and security fixes.
Comment #2
sokrplare commentedComment #3
Konstantin Boyandin commentedThe change is so significant it can only be implemented in Drupal 8?
I.e., I have to use 'hacks' to theme interim comment editing pages?
Comment #5
sokrplare commentedHey Konstantin!
My understanding is that Drupal 7 (or any current Drupal release) only receives bug fixes. As this is a feature request it should be developed against D8 (then hopefully backported against D7).
Comment #9
heretic381 commentedWhat's the easiest way to have different "comment--reply" templates per content-type?
I need to override the system comment reply page only for certain content-type. If I use page--comment--reply.tpl.php, it's overriding the reply page for the whole site but this is not what I need.
Thans in advance.
Comment #10
jonathanshawComment #11
areke commentedThis should probably be split up into multiple issues.
Comment #25
smustgrave commentedThank 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!
Comment #26
smustgrave commentedSince there's been no follow up and a feature request going to close out. Can always be re-opened
Thanks all