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
| <?php | |
| class displayentrybytagandslug extends Plugin | |
| { | |
| /** | |
| * Add an author rewrite rule | |
| * @param Array $rules Current rewrite rules | |
| **/ |
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', |