Created
April 20, 2015 23:51
-
-
Save katzueno/3397af7c7f97690def94 to your computer and use it in GitHub Desktop.
If you want to redirect to previously logged in page for concrete5.6.x / concretete5.6.x でログイン後に前居たページにリダイレクトさせたい場合。
This file contains 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 | |
// 参考: http://ja.katzueno.com/2014/05/3104/ | |
// テーマ埋め込みの場合 | |
<a href="<?php echo $this->url('/login', 'forward') . $c->getCollectionID() . '/';?>">ログイン</a> | |
<?php | |
// テーマ以外で埋め込みの場合 | |
$c = Page::getCurrentPage(); // テーマだったら代入されているはずなのでここの行は必要ないです | |
?> | |
<a href="<?php echo View::url('/login', 'forward') . $c->getCollectionID() . '/';?>">ログイン</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment