Note that there are some explanatory texts on larger screens.

plurals
  1. POKeeping track of more than one level of page referrers
    text
    copied!<p>The scenario (all happening within the administration area/backend):</p> <ol> <li>From the listing page, the user clicks a link to view an article (on the backend).</li> <li>From the article view page, the user clicks a link to edit that article.</li> <li>In the article edit page, form is submitted to the current uri.</li> <li>If validation succeeds or user cancels, user is redirected to the article view page.</li> <li>From the article view page, the user click a 'back' link to return to the listing page.</li> </ol> <p>List &lt;--> View &lt;--> Edit</p> <p>Right now, I'm only able to track referring url from a previous page. In the edit form, I'm using a hidden field to maintain referral to the view page, lest it be changed during failed form POST submission to itself and user remains in the edit page.</p> <p>Problem is that when the user returns to the view page from edit, the 'back' link to the listing page is now linked to the edit page.</p> <p>FYI, </p> <ul> <li>The listing page url is dynamic as the user should return to the listing on the same page and sort order (stored in query strings); therefore a fixed url is out of the question.</li> <li>In the past, I've tried using sessions (e.g. SESSION['view_to_list_ref'] SESSION['edit_to_view_ref']), but it messed up with multiple tabs.</li> <li>I could transition between view/edit via ajax, but I'm hoping to keep the app simple and ajaxless at this point of time.</li> <li>I'm using PHP + Kohana 3.2 Framework</li> </ul> <p>The only solution I can think of is to have the list page url encoded and appended to the 'view article' link via query string. This way, the location of the listing page is preserved even while in the edit page; as the referring url back to view page would also contain the listing page url in the query string. However I don't really like the idea of 'dirtying' the url with long parameter values (encoded or not).</p> <p>I'm really hoping there is a more elegant solution to this problem of generally tracking multiple levels of page referrals; not just specifically to solving the scenario I've mentioned.</p> <p>EDIT: Oh and the solution should be able to support multiple tabs performing the same scenario.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload