I reuse (include) a twig view (statuses.twig) on two different pages; timeline.twig (url is “localhost/coolsite/public/timeline/”) and profile.twig (“localhost/coolsite/public/profile/josh”).The statuses.twig view has a form which allows the user to reply to a status. the action of the form points to lets say “localhost/coolsite/public/status/4/reply/” After the user click the reply button, I will like it to redirect to the same page (either the timeline or the profile page depending on which page it is currently on). However, I’m experiencing that it is redirecting to the url of the form and not to the url of the page that the form is within.
I use the following:
but it only returns the url of the form and not the parent page the form is in.