2008年3月2日日曜日

Nucleus スペシャルスキンパーツで独立ページ

独立ページを作りたい

WordPressだと、投稿ページのほかに「ページ」というので共通のスキンを使った独立したページを作ることができる。これをNucleus でもやりたいもんだ。

[レイアウト設定]>[スキン編集]でスキンを選ぶと「編集」のページに「スペシャルスキン」という入力窓が現れる。

スキン & テンプレートには、スキンの種別は8つで、item(個別アイテム)、archive(アーカイブ)、archivelist(アーカイブリスト)、archivelist(アーカイブリスト)、search(検索)、member(メンバー)、imagepopup(ポップアップ画像)、index(メイン)とerror タイプだと書いてあった。それ以外の「スペシャル」だとするとこいつぁ怪しいぞ。

「スペシャルスキン」で検索すると、当たりだった。これで独立ページが作れるらしい。
最終的にTips & Suggestions
の下の方にHow to create a Special skin partが見つかった。
英語だけど、この際ないよりはマシ。

    How to create a Special skin part

  1. Enter the Nucleus admin area and go to Skins management page (Layout>Skins). Find your skin and click the Edit link in the right column.

  2. Under the list of skin parts there is a sections called Special skin parts. In the field type the name of your special skin part and then click the Create button. (I'm using the name 'About' for my example). You then get a Edit skin part form, just like for any other skin part, that you can add content, skin variables or anything else. If you want to make it look like the rest of your site, you can copy the contents of the Main Index skinpart here and replace the <%body(...)%> skin variable with the contents of the static page.

    For example, using the default skin, the contents of the About skin part would look something like this:

    <%parsedinclude(head.inc)%>

    <!-- page header -->
    <%parsedinclude(header.inc)%>
    ...............
    コードがダーっと書いてあって、
    ...............
    <!-- page menu -->
    <h2 class="hidden">Sidebar</h2>
    <div id="sidebarcontainer">
    <%parsedinclude(sidebar.inc)%>
    </div>

    <!-- page footer -->
    <%parsedinclude(footer.inc)%>

  3. Now to access this page, you would point your browser (or put a link in your skin somewhere) to

    www.yourdomain.tld/index.php?special=About
  4. You can edit this skin part just as you would any other skin part and most skin variables and plugins will probably work.

    Note: You may want to keep your static content in a file called About.html in the skins/default/ directory (if using the default skin) and instead of typing the content of the page in the skin part, just put <%include(About.html)%>. There's almost no restriction on what these pages can contain.
一応exciteの翻訳窓に放り込んでみた。
でも「どうSpecial皮膚部分を作成するか。」はあんまりなので、S/皮膚/skin。
    どうSpecialSkin部分を作成するか。

  1. Nucleusアドミン領域に入ってください、そして、Skins管理ページ(レイアウト>スキン)に行きます。 Skinを見つけてください、そして、正しいコラムをEditリンクをクリックします。

  2. Skinの部品のリストの下では、SpecialSkinの部品と呼ばれるセクションがあります。 分野に、あなたの特別なSkin部分の名前をタイプしてください、そして、次に、Createボタンをクリックします。 (私は例に名前'About'を使用しています。) 次に、あなたはまさしくいかなる他のSkin部分などのようなEditSkin部分フォームも得て、内容、Skin変数または他の何かを加えることができます。 それをあなたのサイトの残りに似させたいなら、あなたは、静的なページのコンテンツにここにMain Index skinpartのコンテンツをコピーして、<%本体( )%>Skin変数を置き換えることができます。
    例えば、デフォルトSkinを使用して、AboutSkin部分のコンテンツはこのように見えるでしょう:
全然わからない。ますます混乱しちゃう。
とにかくやってみる。
[レイアウト設定]>[スキン編集]で、いま使っている「greygradient」の「編集」をクリックする。


「スキンの編集 'greygradient'」の画面で「スペシャルスキンパーツ」に、新しいスキンパーツ名を入力し「作成」をクリックする。


「スキンの編集 'greygradient': About」にHow to create a Special skin partにあったコードをコピーする。


「スキンの更新」をクリックする。
「メッセージ: スキンデータが保存されました」と表示された。

[レイアウト設定]>[スキン編集]に戻ると「Special1」というスキンが増えた。


http://192.168.0.999/~nucleus/index.php?special=About
でスペシャルスキンのページが表示された。


今後の課題:
スペシャルスキンをサイドバーの目次に表示する。

疑問:スペシャルスキンのデータはどこにしまわれるのだろう。
探した:「データベース: nucleus1 - テーブル : nucleus_skin」の中に、スキン/greygradientで、スキンタイプ/aboutというレコードができていた。

間違いはこちら

[レイアウト設定]>[スキン編集]で「新しいスキン」を作って、その中に。「スペシャルスキンパーツ」を作る。
[レイアウト設定]>[スキン編集]に「Special1」というスキンが増えるが、表示できない。


http://192.168.0.999/~nucleus/index.php?special=About
「スキン エラー」だけ。
で期待の画面が表示されない。

[管理ホーム]>[Nucleus Blog 1]の「設定」で
「標準のスキン」を「Special1」にしたら、期待の画面が表示される。

スキンというから、新しいスキンセットから作って、その中に Aboutというスキンを作ったのね。(- -);

0 件のコメント: