<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>イテルの一日一問 &#187; テンプレート</title>
	<atom:link href="http://oneday.ter.jp/tag/%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88/feed" rel="self" type="application/rss+xml" />
	<link>http://oneday.ter.jp</link>
	<description>一日にひとつは何かを考える。</description>
	<lastBuildDate>Mon, 31 Jan 2011 09:23:33 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/tag/%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88/feed" />
		<item>
		<title>cakephpでレイアウトを行う</title>
		<link>http://oneday.ter.jp/php/cakephp-php/812.html</link>
		<comments>http://oneday.ter.jp/php/cakephp-php/812.html#comments</comments>
		<pubDate>Wed, 02 Dec 2009 01:23:41 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[テンプレート]]></category>
		<category><![CDATA[レイアウト]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=812</guid>
		<description><![CDATA[投稿の順番が入れ違いではありますが、レイアウトの指定についてメモります。 ベースとなるレイアウトは「app/view/layout」に記載していくらしい。 個別のページの場合は、「app/view/」内にコントローラに基 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://oneday.ter.jp/wp-content/uploads/2009/12/cake1-700x200.jpg" alt="cake" title="cake" width="700" height="200" class="alignnone size-thumbnail wp-image-826" /></p>
<p>投稿の順番が入れ違いではありますが、レイアウトの指定についてメモります。</p>
<p>ベースとなるレイアウトは「app/view/layout」に記載していくらしい。<br />
個別のページの場合は、「app/view/」内にコントローラに基づいたファイル名で<br />
ctpファイルを設置していくとのことです。</p>
<h3>レイアウトの指定</h3>
<p>ベースとなるレイアウトの指定はコントローラで行うようですね。</p>
<pre class="brush: php; title: ; notranslate">
$this-&gt;layout = 'login';
</pre>
<p>これを指定すると「app/view/layout」内の「login.ctp」をベースにレイアウトされます。</p>
<h3>コントローラとビュー</h3>
<p>コントローラで以下のような指定をしている場合は次のようになります。</p>
<pre class="brush: php; title: ; notranslate">
// controller/users_controller.php
class UsersController extends AppController {
  var $name = 'Users';
  /*ログイン*/
  function login() {
    $this-&gt;layout = 'login';
  }
}
</pre>
<p>viewの位置は「view/users/login.ctp」となるようです。</p>
<pre class="brush: php; title: ; notranslate">
  // view/users/login.ctp
  // ここに内容を記述していく
</pre>
<p>loginにアクセスした際には、「app/view/layout/login.ctp」をベースのレイアウトとして<br />
「app/view/users/login.ctp」のテンプレートを使って表示されるようです。</p>
<p>理解が間違っていたらご連絡くださいませ。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/php/cakephp-php/812.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/php/cakephp-php/812.html" />
	</item>
		<item>
		<title>cakephpでcssや画像の指定</title>
		<link>http://oneday.ter.jp/php/cakephp-php/809.html</link>
		<comments>http://oneday.ter.jp/php/cakephp-php/809.html#comments</comments>
		<pubDate>Wed, 02 Dec 2009 01:13:08 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[テンプレート]]></category>
		<category><![CDATA[レイアウト]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=809</guid>
		<description><![CDATA[いろんなブログやマニュアルなどに掲載されているかもしれないが自分のメモ用として記載しておきます。 CSSの指定 webrootのcssフォルダ内の「hoge.css」を読み込みます。 画像の指定 webrootのimgフ [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://oneday.ter.jp/wp-content/uploads/2009/12/cake2-700x200.jpg" alt="cake" title="cake" width="700" height="200" class="alignnone size-thumbnail wp-image-829" /></p>
<p>いろんなブログやマニュアルなどに掲載されているかもしれないが自分のメモ用として記載しておきます。</p>
<h3>CSSの指定</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php echo $html-&gt;css('hoge'); ?&gt;
</pre>
<p>webrootのcssフォルダ内の「hoge.css」を読み込みます。</p>
<h3>画像の指定</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php echo $html-&gt;image(&quot;hoge.png&quot;) ?&gt;
</pre>
<p>webrootのimgフォルダ内の「hoge.png」を読み込みます。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/php/cakephp-php/809.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/php/cakephp-php/809.html" />
	</item>
		<item>
		<title>記事をテンプレート化する「Post Template」</title>
		<link>http://oneday.ter.jp/wordpress/783.html</link>
		<comments>http://oneday.ter.jp/wordpress/783.html#comments</comments>
		<pubDate>Sun, 30 Aug 2009 01:12:10 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Post Template]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[テンプレート]]></category>
		<category><![CDATA[プラグイン]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=783</guid>
		<description><![CDATA[一日一問が崩れつつある。 10日分くらい溜まった。（現在9月6日・・・） 気を取り直して今日？は「Post Template」。 記事を定型化しておきたい場合に利用する。 プラグイン→新規追加をクリックする。 「Post [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://oneday.ter.jp/wp-content/uploads/2009/08/00_wordpress1-700x200.jpg" alt="00_wordpress" title="00_wordpress" width="700" height="200" class="alignnone size-thumbnail wp-image-843" /></p>
<p>一日一問が崩れつつある。<br />
10日分くらい溜まった。（現在9月6日・・・）<br />
気を取り直して今日？は「Post Template」。<br />
記事を定型化しておきたい場合に利用する。</p>
<ol>
<li>プラグイン→新規追加をクリックする。</li>
<li> 「Post Templates」と入力してインストールリンクをクリック。</li>
<li>ウィンドウ内の「インストール」ボタンをクリックして「プラグインを有効化」リンクをクリック。</li>
</ol>
<p>記事一覧に「テンプレート化」というリンクが表示されるので、<br />
テンプレートにした記事でリンクをクリックするとテンプレート化できる。</p>
<p>また、管理メニューにもテンプレートを管理するメニューが表示されるため、<br />
こちらで編集や登録することが可能。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/wordpress/783.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/wordpress/783.html" />
	</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.288 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-10 18:06:19 -->

