Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What do you think this ? #10

Open
phatyh opened this issue Dec 25, 2014 · 0 comments
Open

What do you think this ? #10

phatyh opened this issue Dec 25, 2014 · 0 comments

Comments

@phatyh
Copy link

phatyh commented Dec 25, 2014

Pigeon::pattern(array(
// key => pattern
'NewsDetail' => 'news/%s/%s-%s.html',
'NewsCategory' => 'news/%s/',
));

$category = 'game';
$sef = 'resident-evil-remake-gets-release-date-price';
$id = 5425;

Pigeon::make('NewsDetail', $category, $sef, $id);
output: news/game/resident-evil-remake-gets-release-date-price-5425.html

Pigeon::make('NewsCategory', $category);
output: news/game/

i think maybe very useful, because every link control same file.
if i want to change link pattern, just one time.

thank you.
note: sorry for my english.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant