{"id":245,"date":"2010-05-03T15:32:32","date_gmt":"2010-05-03T13:32:32","guid":{"rendered":"http:\/\/webpiraten.de\/?p=245"},"modified":"2010-05-03T15:34:42","modified_gmt":"2010-05-03T13:34:42","slug":"agavi-routing-specials","status":"publish","type":"post","link":"https:\/\/webpiraten.de\/index.php\/frameworks\/agavi-routing-specials\/","title":{"rendered":"Agavi routing specials"},"content":{"rendered":"<p>Um bestimmte Agavi output_types bei speziellen routings zu bedienen kann man die routing.xml wie folgt anpassen.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;!-- cut out leading slash --&gt;\r\n&lt;route name=&quot;slasher&quot; pattern=&quot;^\/&quot; stop=&quot;false&quot; imply=&quot;true&quot; cut=&quot;true&quot; \/&gt;\r\n\r\n&lt;!-- match ajax calls with special http header --&gt;\r\n&lt;route pattern=&quot;XMLHttpRequest&quot; source=&quot;_SERVER&#x5B;HTTP_X_REQUESTED_WITH]&quot; stop=&quot;false&quot; output_type=&quot;ajax&quot; \/&gt;\r\n\r\n&lt;!-- match json calls with special http header --&gt;\r\n&lt;route pattern=&quot;application\/json&quot; source=&quot;_SERVER&#x5B;HTTP_ACCEPT]&quot; stop=&quot;false&quot; output_type=&quot;json&quot; \/&gt;\r\n\r\n&lt;!-- cut out special pointer --&gt;\r\n&lt;route name=&quot;portal&quot; pattern=&quot;^({portal:&#x5B;a-zA-Z]{3}}\/)?&quot; stop=&quot;false&quot; imply=&quot;true&quot; cut=&quot;true&quot;&gt;\r\n    &lt;callbacks&gt;\r\n        &lt;callback class=&quot;RoutingCallback&quot; \/&gt;\r\n    &lt;\/callbacks&gt;\r\n&lt;\/route&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Um bestimmte Agavi output_types bei speziellen routings zu bedienen kann man die routing.xml wie folgt anpassen. &lt;!&#8211; cut out leading slash &#8211;&gt; &lt;route name=&quot;slasher&quot; pattern=&quot;^\/&quot; stop=&quot;false&quot; imply=&quot;true&quot; cut=&quot;true&quot; \/&gt; &lt;!&#8211; match ajax calls with special http header &#8211;&gt; &lt;route pattern=&quot;XMLHttpRequest&quot; source=&quot;_SERVER&#x5B;HTTP_X_REQUESTED_WITH]&quot; stop=&quot;false&quot; output_type=&quot;ajax&quot; \/&gt; &lt;!&#8211; match json calls with special http header &#8211;&gt; &lt;route pattern=&quot;application\/json&quot; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,3,79],"tags":[8,173,168,86,171,172,174,169,166,167,170],"class_list":["post-245","post","type-post","status-publish","format-standard","hentry","category-agavi-framework","category-frameworks","category-xml","tag-agavi","tag-ajax","tag-header","tag-http","tag-http_accept","tag-http_x_requested_with","tag-json","tag-output","tag-routing","tag-specials","tag-types"],"_links":{"self":[{"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/posts\/245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":3,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions"}],"predecessor-version":[{"id":247,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions\/247"}],"wp:attachment":[{"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/categories?post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/tags?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}