Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an Absolute Url for Comments #8

Open
cooncesean opened this issue Aug 7, 2012 · 0 comments
Open

Create an Absolute Url for Comments #8

cooncesean opened this issue Aug 7, 2012 · 0 comments

Comments

@cooncesean
Copy link

Create an absolute url for comments so we can provide a more contextual environment for how a single comment is displayed.

Without this, the default pattern has been to link back to the absolute_url of the content_object that the comment is associated to. This isn't ideal as it could take the user a number of clicks to try to find the corresponding comment via pagination.

Proposed Solution:

  1. Create a view/url that takes a comment_id and gets the comment as well as the page on which it can be found; then redirects the user to that comment's content_object.get_absolute_url() passing both the comment_id and p as GET params.
  2. Optionally modify the comment detail template(s) to add <a name='{{ comment.id }} /> tags next to each comment so that the user can be directed to the comment requested without having to scroll. Optionally highlight the specified comment to make it easy for them to spot.
cooncesean pushed a commit to cooncesean/ella-comments that referenced this issue Aug 7, 2012
…il()`. This view fetches the requested comment, then using both kwargs and the comment's `content_object`s properties, determines the page (in pagination) on which the comment is located and finally redirects the user to the `absolute_url` of the `content_object` that the comment is associated to.

Unit tests are included. ella#8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant