LoginSignup
0
0

More than 5 years have passed since last update.

joomlaのcontactのフォームのテンプレートを選択できるようにする方法

Last updated at Posted at 2015-02-10

これでいいかわからないけど、とりあえず、やってみた。

1.templates/テンプレート名/html/com_contact/contact/にcomponents/com_contact/view/contact/tmpl/default.phpをコピー
2.<?php echo $this->loadTemplate('form'); ?>の上に以下を追加
<?php
$layout_name=$this->params->get("contact_layout");
$layout_name_split=explode(":",$layout_name);
$this->setLayout($layout_name_split[1]);
?>

3.templates/テンプレート名/html/com_contact/contact/にdefault.phpをファイル名を変更(例えば、contact.php)
4.components/com_contact/view/contact/tmpl/default_form.phpをtemplates/テンプレート名/html/com_contact/contact/に変更。ファイル名を変更(例えば、contact_form.php)
5.管理画面のコンタクト管理のコンタクトの表示の代替レイアウトで3で選択したものを選択

もっといい方法があるかもしれないけど。

参考:テンプレートの上書き方法

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0