*Most Powerful Pony!* Posted December 30, 2013 Share Posted December 30, 2013 It would be cool to designate page symlink another page. That would need addressing at a different page (symlink), runs and shows the referenced page, including all its content*, so would the same content was available in two completely different locations. This is useful for example for multicategory, availability of books both the author and the year of release while preserving the path in the address bar. Link to comment Share on other sites More sharing options...
teppo Posted December 30, 2013 Share Posted December 30, 2013 (edited) This is doable with current tools already; you can either find/get specific page and render it with $page->render() at any given location (i.e. other existing page or even when a page isn't found by hooking to ProcessPageView::pageNotFound) or use URL segments to create fake page paths. To be honest this doesn't sound like something that would need to be implemented as a built-in feature. Edit: by the way, this thread is owning Google search results for keyword "svoesoderzhimoe".. Edited December 30, 2013 by teppo 2 Link to comment Share on other sites More sharing options...
Craig Posted December 30, 2013 Share Posted December 30, 2013 Edit: by the way, this thread is owning Google search results for keyword "svoesoderzhimoe".. I don't know what that word is; but combine it with "process" and you get a Googlewhack! Link to comment Share on other sites More sharing options...
*Most Powerful Pony!* Posted December 31, 2013 Author Share Posted December 31, 2013 This is doable with current tools already; you can either find/get specific page and render it with $page->render() at any given location (i.e. other existing page or even when a page isn't found by hooking to ProcessPageView::pageNotFound) or use URL segments to create fake page paths. Such way it is necessary to watch use of segments, the page has to have plus the template, by default segments are limited to 4. I want to see the similar decision for realization of a multi parents. svoesoderzhimoe = своё содержимое as this contain Link to comment Share on other sites More sharing options...
teppo Posted December 31, 2013 Share Posted December 31, 2013 This is pretty much how I'd solve this, still no need for any core changes or additions Create new template called "symlink", add page type field "symlink" with value limited to single Page (use PageListSelect as input field type) and then in template file do something like this: <?php if ($page->symlink instanceof Page && $page->symlink !== $page) echo $page->symlink->render(); else throw new Wire404Exception(); Now you can add as many symlinks you wish and easily choose which page each is tied to. Don't forget to add canonical tags to let robots know which version of this page is the "original" one, though, or you'll have serious SEO issues. 4 Link to comment Share on other sites More sharing options...
*Most Powerful Pony!* Posted December 31, 2013 Author Share Posted December 31, 2013 serious SEO issues. http://en.wikipedia.org/wiki/Canonical_link_element <link rel="canonical" href="http://www.example.com/directory/page/"> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now