I have an own Plugin for Jobs with a list and a show View (on the same page). I entered my params in the "postVarSets" in the realurl_conf.php (grouped by "job-view") and so my Links look like following:
/jobs - List View
/jobs/job-view/show/Job/testjob - Detail View
Now i can shorten my path with the "encodeSpURL_postProc":
$params['URL'] = str_replace('job-view/show/Job', 'job-detail', $params['URL']);
and decode by
$params['URL'] = str_replace('job-detail', 'job-view/show/Job', $params['URL']);
/jobs - List View
/jobs/job-detail/testjob - Detail View
But i want my Detail View to look like:
/jobs/testjob
But I can't use
$params['URL'] = str_replace('jobs/job-view/show/Job', 'jobs', $params['URL']);
because the decode
$params['URL'] = str_replace('jobs', 'jobs/job-view/show/Job', $params['URL']);
would also try to decode the List View back.
So, is it possible to shorten the URL path of the detail page to the second level?