3

I've added an "Add Comment Link" to a View and I'm wondering how I would go about adding a custom query string to the generated URL?

I'd guess I need to do something under "Rewrite Results", either with "Rewrite the output of this field" or "Output this field as a link" but I only seem to have an option to include the fully rendered link as a replacement token.

Is there a way (without resorting to regex) to get the URL from the link so I can rewrite the output myself? Or is there an easier way to add the query string?

Thanks

  • IF the link is field of view it could be possible to get the url in tpl using the $row variable. – j2r Jan 31 '12 at 8:44
  • 2
    @j2r: It is a field, but I guess there's nothing in the UI already to do this? That's not a problem as templates are fine for my purposes. If you want to post that as the answer I'll accept it, thanks :) – Clive Jan 31 '12 at 18:34
3

If the link is a field of view, it could be possible to get the URL in the template file using the $row variable.

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.