Skip to content

Instantly share code, notes, and snippets.

@katzueno
Created April 20, 2015 23:51
Show Gist options
  • Save katzueno/3397af7c7f97690def94 to your computer and use it in GitHub Desktop.
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 でログイン後に前居たページにリダイレクトさせたい場合。
<?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