All pastes #921182 Raw Edit

Someone

public text v1 · immutable
#921182 ·published 2008-02-27 21:30 UTC
rendered paste body
	public function filter_rewrite_rules( $rules ) {
		$rules[] = new RewriteRule(array(
			'name' => 'item',
			'parse_regex' => '%portfolio/(?P<item>.*)/?$%i',
			'build_str' => 'portfolio/{item}',
			'handler' => 'UserThemeHandler',
			'action' => 'portfolio',
			'priority' => 7,
			'is_active' => 1,
		));
		
		return $rules;
	}
	public function action_handler_portfolio($handler_vars) {
		Utils::debug($handler_vars);
		$this->theme= Themes::create();
		$this->theme->assign( 'portfolio', $handler_vars['item'] );
		$this->theme->assign( 'title', 'Portfolio');
		$this->theme->display( 'portfolio' );
		exit;
	}