{"id":617,"date":"2010-08-25T09:55:51","date_gmt":"2010-08-25T13:55:51","guid":{"rendered":"http:\/\/www.a2life.info\/w\/?p=617"},"modified":"2010-08-25T09:55:51","modified_gmt":"2010-08-25T13:55:51","slug":"way-of-wayfinder","status":"publish","type":"post","link":"https:\/\/www.a2life.info\/w\/?p=617","title":{"rendered":"Way of wayfinder"},"content":{"rendered":"<p>ModX\u306eWayfinder\u306f\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u30ea\u30b9\u30c8\u3092\u4f5c\u308b\u3068\u304d\u306b\u3001base_url\u304b\u3089\u306e\u76f8\u5bfe\u30d1\u30b9\u3092\u51fa\u529b\u3059\u308b\u3002\u3000\u3088\u3063\u3066\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b&lt;base&gt;tag\u3067\u3000[[++site_url]]\u6307\u5b9a\u3092\u3057\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308b\u3001\u3053\u308c\u3092\u6307\u5b9a\u305b\u305a\u306b\u968e\u5c64\u306e\u4e0b\u304c\u3063\u305f\u30da\u30fc\u30b8\u304b\u3089\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3000\u30b7\u30b9\u30c6\u30e0\u306f\u30ab\u30ec\u30f3\u30c8\u30d1\u30b9\u3092\u76f8\u5bfe\u30d1\u30b9\u306e\u524d\u306b\u8ffd\u52a0\u3059\u308b\u304b\u3089\u30ea\u30f3\u30af\u5148\u304c\u5b58\u5728\u3057\u306a\u3044\u4e8b\u614b\u306b\u306a\u308b\u3002<\/p>\n<p>Make sure you have the following in the the &lt;head&gt; section of your template:<br \/>\nCode:<\/p>\n<div>&lt;base href=&#8221;[(site_url)]&#8221; \/&gt;<\/div>\n<div>without the above code in the site template, the navigation menu\u00a0 wayfinder will generate will not render correct path.\u00a0\u00a0 This is because Wayfinder generates the path from base url. If you left &lt;base&gt; tag out, the system will always start from current path.<\/div>\n<div>Let me describe what had happened to me.<\/div>\n<div>Target document tree looks like below;<\/div>\n<div>one &#8211; two<\/div>\n<div>\u00a0\u00a0|_ \u00a0 \u00a0three<\/div>\n<div>\u00a0\u00a0|__ four<\/div>\n<div>\u00a0\u00a0|__ five<\/div>\n<div>The wayfinder sinppet generates a list with correct hrefs and \u00a0works fine in the page one.<\/div>\n<div>When navigated to page two, then the links generated for other pages are incorrect.<\/div>\n<div>if you are in second level, then the path will start as <a href=\"http:\/\/...\/one\">http:\/\/&#8230;\/one<\/a>.\u00a0 the wayfinder adds \/one\/three.\u00a0 Therefore the generated path is <span style=\"font-family: Arial; color: #000000; font-size: small;\"><a href=\"http:\/\/.....\/one\/one\/three,\">http:\/\/&#8230;..\/one\/one\/three,<\/a>\u00a0\u00a0rather than\u00a0<a href=\"http:\/\/....\/one\/three\">http:\/\/&#8230;.\/one\/three<\/a>\u00a0\u00a0etc., (&#8220;one\/ &#8220;is repeated twice)<\/span><\/div>\n<div>Simply adding the &lt;base href=&#8221;[[++site_url]]&#8221;&gt; line at the &lt;head&gt; section of the template solve the issue.<\/div>\n<p><!--EndFragment--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ModX\u306eWayfinder\u306f\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u30ea\u30b9\u30c8\u3092\u4f5c\u308b\u3068\u304d\u306b\u3001base_url\u304b\u3089\u306e\u76f8\u5bfe\u30d1\u30b9\u3092\u51fa\u529b\u3059\u308b\u3002\u3000\u3088\u3063\u3066\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b&lt;base&gt;tag\u3067\u3000[[++site_url]]\u6307\u5b9a\u3092\u3057\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308b\u3001\u3053\u308c\u3092\u6307\u5b9a\u305b\u305a\u306b\u968e\u5c64\u306e\u4e0b\u304c\u3063\u305f\u30da\u30fc\u30b8\u304b\u3089\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3000\u30b7\u30b9\u30c6\u30e0\u306f\u30ab\u30ec\u30f3\u30c8\u30d1\u30b9\u3092\u76f8\u5bfe\u30d1\u30b9\u306e\u524d\u306b\u8ffd\u52a0\u3059\u308b\u304b\u3089\u30ea\u30f3\u30af\u5148\u304c\u5b58\u5728\u3057\u306a\u3044\u4e8b\u614b\u306b\u306a\u308b\u3002 Make sure you have the following in the the &lt;head&gt; section of your template: Code: &lt;base href=&#8221;[(site_url)]&#8221; \/&gt; without the above code in the site template, the navigation menu\u00a0 wayfinder will generate will not render correct path.\u00a0\u00a0 This is because Wayfinder generates the path from base url. If you left &lt;base&gt; tag out, the system will always start from current path. Let me describe what had happened to me. Target document tree looks like below; one &#8211; two \u00a0\u00a0|_ \u00a0 \u00a0three \u00a0\u00a0|__ four \u00a0\u00a0|__ five The wayfinder sinppet generates a list with correct hrefs and \u00a0works fine in the page one. When navigated to page two, then the links &hellip; <a href=\"https:\/\/www.a2life.info\/w\/?p=617\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,7,3],"tags":[],"class_list":["post-617","post","type-post","status-publish","format-standard","hentry","category-modx","category-web-design-study","category-web-making"],"_links":{"self":[{"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/posts\/617","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=617"}],"version-history":[{"count":1,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/posts\/617\/revisions"}],"predecessor-version":[{"id":618,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/posts\/617\/revisions\/618"}],"wp:attachment":[{"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=617"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=617"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}