Created
May 3, 2013 12:45
-
-
Save somefool/5508897 to your computer and use it in GitHub Desktop.
hackign habari for custom rewrite which a has tag/post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this in system/classes/rewriterules | |
| array( 'name' => 'display_entry_tag', 'parse_regex' => '%^(?P<tag>[^/]+)/news/(?P<slug>[^/]+)(?:/page/(?P<page>\d+))?/?$%i', 'build_str' => '{$tag}/news/{$slug}(/page/{$page})', 'handler' => 'UserThemeHandler', 'action' => 'display_post', 'priority' => 100, 'description' => 'Return entry matching specified slug and', 'parameters' => serialize( array( 'require_match' => array('Posts', 'rewrite_match_type'), 'content_type'=>'entry', 'request_types' => array('display_post') ) ) ), | |
| amend route301 | |
| 'display_entry_by_tag_and_slug' => array( // Wordpress tag and slug based permalink: <tag>/<slug> | |
| 'name' => 'display_entry_by_tag_and_slug', | |
| 'parse_regex' => '%^(?P<tag>[^/]+)/(?P<slug>[^/]+)(?:/page/(?P<page>\d+))?/?$%i', | |
| 'build_str' => '{$tag}/{$slug}(/page/{$page})', | |
| 'action' => 'display_entry_tag', | |
| 'description' => 'Wordpress tag and name based permalink', | |
| 'priority' => 1000 | |
| ), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment