- CYPOCHI.com
- マニュアル
- CMS
- サイト構築者
- テンプレート
- テンプレートタグ
テンプレートタグ
Last Updated:2025.05.27
ブロック
全てを表示する
テキスト保持
タグ | <xxx data-cp-text-id="x"></xxx> | |||
解説 | ブロックのオプションを変更した際、タグ内部のテキストを保持します。 | |||
前提 | デフォルトにしたいテキストは普通にタグの中に書いてください。 | |||
入力例(ブロック編集) | <div contenteditable="true" class="cp-inner" data-cp-text-id="1"></div> | |||
出力結果 | <div class="cp-inner"></div> |
画像保持
タグ | <xxx data-cp-img-id="x"></xxx> | |||
解説 | ブロックのオプションを変更した際、タグ内部のテキストを保持します。 | |||
前提 | デフォルトにしたい画像は画像挿入から画像を挿入してください。 デフォルトがなくてもダミー画像を入れてください。 | |||
入力例(ブロック編集) | <div contenteditable="true" class="cp-inner" data-cp-img-id="1"><img data-fr-src="https://placehold.jp/56/dddddd/333333/1200x800.png?text=画像を登録してください。" alt=""></div> | |||
出力結果 | <div class="cp-inner"></div> |
埋め込みコード
タグ | <div contenteditable="false" class="cp-inner"><span contenteditable="false" class="code"></span><textarea contenteditable="true" class="cp-external-text-area"></textarea></div> | |||
解説 | iframeやscriptタグ等の外部サービスコードを入力する欄が表示されます。 |
編集画面以外表示
タグ | <div contenteditable="false" cp-type="prepub"></div> | |||
解説 | 入れ子のブロックを作成します。 | |||
入力例(ブロック編集) | <div contenteditable="false" cp-type="prepub"> ##{##div class="aaa"##}## ##{##div class="bbb"##}## </div> <div contenteditable="false" cp-type="prepub"> ##{##/div##}## ##{##/div##}## </div> | |||
出力結果 | 編集画面時 ##{##div class="aaa"##}####{##div class="bbb"##}## ##{##/div##}####{##/div##}## プレビュー時 <div class="aaa"> <div class="bbb"> </div> </div> 公開ページ <div class="aaa"> <div class="bbb"> </div> </div> | |||
補足 | ##{##div class="cp-btn cp-btn-01 cp-all"##}## と、エスケープ処理をすると同時に <div contenteditable="false" cp-type="prepub"> と </div> で挟まないとテキストが削除できてしまいます。 contenteditable="false"は、編集画面で誤ってタグを編集できないように記述します。 cp-type="prepub"は、プレビュー/公開時に上記「div contenteditable="false"」のタグを削除するための目印として記述、 ##{##と##}##は、プレビュー/公開時に<と>に置換されます。 ※「#」は半角「#」に置き換えてください。 |
コンポーネント
メニューリスト
タグ | <nav class="gnav" cp-type="cp-nest-list" start-node="1" end-node="10"> | ||
タグ内で使用する属性 | 値 | 用途 | |
HTMLに直接記入 | {name} | ページ名を表示 | |
{dirname} | ディレクトリ名を表示 | ||
{filename} | ファイル名を表示 | ||
{pageTitle} | ページタイトルを表示、無ければページ名を表示 | ||
{indexClass} | インデックスページの時に「index」を表示 | ||
{noIndexClass} | インデックスページ以外の時に「no-index」を表示 | ||
{url} | hrefとして書き出すURL | ||
{target} | target属性 | ||
start-node | 数値 | 表示したい階層から表示 | |
end-node | 数値 | 表示したい階層までを表示 | |
cp-nest-type | nest-start | 特定の位置のみコンテンツを出力 | |
cp-nest-repeat | repeat | 子階層が存在した場合、nest_listと同じフォーマットで表示 | |
解説 | トップから現階層までディレクトリとアクティブなディレクトリ内のファイルと、現階層内のディレクトリ直下のファイル一覧を表示します。 | ||
入力例(コンポーネント編集) | <div class="menu" cp-type="cp-nest-list"> <!-- 階層の1ページ目であれば<ul>タグ開始 --> <div cp-nest-type="nest-start"> <div class="{fActive} {indexClass}" > <p class="level-{level} id-{id} dir-{dirname} {noIndexClass}"> LV:<span>{level}</span> ID:<span>{id}</span> </p> <a class="{pActive}" href="{url}" target={target}">{name}</a> <div cp-nest-repeat="repeat" > </div> </div> </div> </div> | ||
出力結果 | <div class="menu"> <!-- 階層の1ページ目であれば<ul>タグ開始 --> <ul> <li class="active"> <p>LV:1 フォルダ名: ファイル名:index ID:1</p> <a class=" href="https://www.cypochi-u.ac.jp/index.html">サイポチ大学</a> <!-- 階層の1ページ目、最終ページ以外はspanを追加 --> <!-- 更に階層があれば同じ処理を繰り返す --> <!-- 階層の1ページ目であれば<ul>タグ開始 --> <ul> <li class="active"> <p>LV:2 フォルダ名:info ファイル名:index ID:2</p> <a class=" href="https://www.cypochi-u.ac.jp/info/index.html">大学案内TOP</a> <!-- 階層の1ページ目、最終ページ以外はspanを追加 --> <!-- 更に階層があれば同じ処理を繰り返す --> <!-- 階層の1ページ目であれば<ul>タグ開始 --> <ul> <li class="active"> <p>LV:3 フォルダ名:disclosure ファイル名:index ID:4</p> <a class="active" href="https://www.cypochi-u.ac.jp/info/disclosure/index.html">情報公開</a> <!-- 更に階層があれば同じ処理を繰り返す --> </li> <li class="active"> <p>LV:3 フォルダ名:disclosure ファイル名:goal ID:5</p> <a href="https://www.cypochi-u.ac.jp/info/disclosure/goal.html">教育目標</a> <!-- 更に階層があれば同じ処理を繰り返す --> </li> <li class="active"> <p>LV:3 フォルダ名:disclosure ファイル名:hoshin ID:6</p> <a href="https://www.cypochi-u.ac.jp/info/disclosure/hoshin.html">各種方針</a> <!-- 更に階層があれば同じ処理を繰り返す --> </li> </ul> </li> </ul> </li> </ul> </div> |
レイアウト
全てを表示する
head
タグ | <cp:head></cp:head> |
解説 | headタグを挿入します。 |
入力例(レイアウト編集) | <html> <cp:head> </cp:head> <body> </body> </html> |
出力結果 | <html> <head> </head> <body> </body> </html> |
スタイルシート
タグ | <cp:css category_code="xxx" code="xxx" media="xxx"></cp:css> | |||
属性 | 用途 | 記述例 | ||
category_code | スタイルのカテゴリーコードを指定する | <cp:css category_code="base" ></cp:css> | ||
code | スタイルのコードを指定する | <cp:css category_code="base" code="common"></cp:css> | ||
media | mediatypeを指定する。デフォルトはall | <cp:css category_code="base" code="common" media="screen"></cp:css> | ||
解説 | テンプレート>CSS で設定したスタイルシートのリンクを挿入します。 | |||
入力例(レイアウト編集) | <html> <cp:head> <!-- スタイルシートのコードを指定した場合 --> <cp:css category_code="base" code="common"></cp:css> <!-- スタイルシートのカテゴリーコードを指定した場合 --> <cp:css category_code="base" ></cp:css> </cp:head> <body> </body> </html> | |||
出力結果 | <html> <head> <!-- スタイルシートのIDを指定した場合 --> <link rel="stylesheet" href="公開パス/libraries/css/base/common.css"> <!-- スタイルシートのカテゴリーIDを指定した場合 --> <link rel="stylesheet" href="公開パス/libraries/css/base/common.css"> <link rel="stylesheet" href="公開パス/libraries/css/base/admission.css"> <link rel="stylesheet" href="公開パス/libraries/css/base/event.css"> </head> <body> </body> </html> |
スクリプト
タグ | <cp:js category_code="xxxx" code="xxx"></cp:js> | |||
属性 | 用途 | 記述例 | ||
category_code | JSのカテゴリーコードを指定する | <cp:js category_code="base" ></cp:js> | ||
code | JSのコードを指定する | <cp:js category_code="base" code="common"></cp:js> | ||
move_to | bodyの閉じタグ直前に移動させる | <cp:js category_code="base" code="common" move_to="last"></cp:js> | ||
解説 | テンプレート > JS で設定したスクリプトのリンクを挿入します。 | |||
入力例(レイアウト編集) | <html> <cp:head> </cp:head> <body> <!-- JSのコードを直接指定した場合 --> <cp:js category_code="base" code="common"></cp:js> <!-- JSのカテゴリーコードを指定した場合 --> <cp:js category_code="base" ></cp:js> </body> </html> | |||
出力結果 | <html> <head> </head> <body> <!-- JSのIDを指定した場合 --> <script type="text/javascript" src="公開パス/libraries/js/base/common.js"></script> <!-- JSのカテゴリーIDを指定した場合 --> <script type="text/javascript" data-fr-src="公開パス/libraries/js/base/common.js"></script> <script type="text/javascript" data-fr-src="公開パス/libraries/js/base/admission.js"></script> <script type="text/javascript" data-fr-src="公開パス/libraries/js/base/event.js"></script> </body> </html> |
コンポーネント
タグ | <cp:component category_code="xxx" code="xxxx"></cp:component> | |||
属性 | 用途 | 記述例 | ||
category_code | コンポーネントのカテゴリーコードを指定する | <cp:component category_code="base" code="header"></cp:component> | ||
code | コンポーネントのコードを指定する | <cp:component category_code="base" code="header"></cp:component> | ||
解説 | テンプレート > コンポーネントで設定したコンポーネントを挿入します。 | |||
入力例(レイアウト編集) | <html> <cp:head> </cp:head> <body> <header> <!-- ヘッダーを挿入する場合 --> <cp:component category_code="base" code="header"></cp:component> </header> <cp:contents tagName="div" class="content"></cp:contents> <footer> <!-- フッターを挿入する場合 --> <cp:component category_code="base" code="footer"></cp:component> </footer> </body> </html> | |||
出力結果(ページ) | <html> <head> </head> <body> <header> <!-- ヘッダーを挿入する場合 --> <base-header></base-header> </header> <div class="content"></div> <footer> <!-- フッターを挿入する場合 --> <base-sidebar></base-sidebar> </footer> <script data-fr-src="https://cdn.jsdelivr.net/npm/riot@3.13/riot+compiler.min.js"></script> <script id="riotMount">riot.mount('*')</script> <script type="text/javascript">document.write('<script data-devline="638" data-fr-src="/libraries/component/base/header.js?var=' + (new Date()).getDate() + '" type="riot/tag"><\/script>')</script> <script type="text/javascript">document.write('<script data-devline="638" data-fr-src="/libraries/component/base/footer.js?var=' + (new Date()).getDate() + '" type="riot/tag"><\/script>')</script> </body> </html> | |||
出力結果(js) | header.js中身 <base-header> ヘッダーHTML <script> this.on('mount', function() { var baseheaderEvent = globalMakeEvent('baseheaderEvent'); globalFireEvent(document.body, baseheaderEvent); }); </script> </base-header> footer.js中身 <base-footer> フッターHTML <script> this.on('mount', function() { var basefooterEvent = globalMakeEvent('basefooterEvent'); globalFireEvent(document.body, basefooterEvent); }); </script> </base-footer> |
コンテンツ
タグ | <cp:contents tagName="xxx"></cp:contents> | |||
属性 | 用途 | 記述例 | ||
tagName | 置き換えられるタグ。デフォルトはdiv | <cp:contents tagName="main"></cp:contents> | ||
解説 | 各ページで作成したコンテンツを挿入します。 | |||
入力例(レイアウト編集) | <html> <cp:head> </cp:head> <body> <cp:contents tagName="main" class="main"></cp:contents> </body> </html> | |||
出力結果 | <html> <head> </head> <body> <main class="main"> <!-- ブロック1 --> <h2 class="cp-h2-text">大学案内</h2> <!-- ブロック1ここまで --> <!-- ブロック2 --> <h3 class="cp-h3-text">概要</h3> <!-- ブロック2ここまで --> </main> </body> </html> |
サイト名
タグ | <cp:siteName /> |
解説 | サイト設定で指定したサイト名を挿入します。 |
入力例(レイアウト編集) | <html> <cp:head> <title><cp:siteName /></title> </cp:head> <body> </body> </html> |
出力結果 | <html> <head> <title>サイポチ大学</title> </head> <body> </body> </html> |
ページ名
タグ | <cp:pageName /> |
解説 | ページ設定画面のページ名を挿入します。 |
入力例(レイアウト編集) | <html> <cp:head> <title><cp:pageName /> | <cp:siteName /></title> </cp:head> <body> </body> </html> |
出力結果 | <html> <head> <title>ページ設定 | サイポチ大学</title> </head> <body> </body> </html> |
ページURL
タグ | <xxx cp-type="cp-page-url" data-attr="href" ></xxx> | |||
属性 | 用途 | 記述例 | ||
data-attr | href | <div cp-type="cp-page-url" data-attr="href" ></div> | ||
解説 | 現在のページのURLを挿入します。 | |||
入力例(レイアウト編集) | <html> <cp:head> </cp:head> <body> 現在のページのURLは<cp:pageUrl />です。 </body> </html> | |||
出力結果 | <html> <head> </head> <body> 現在のページのURLはhttps://www.cypochi-u.ac.jp/info/disclosure.htmlです。 </body> </html> |
ページタイトル
タグ | <cp:pageTitle /> | |||
解説 | ページ設定画面のページタイトルを挿入。設定されていない場合は、ページ名を挿入します。 | |||
入力例(レイアウト編集) | <html> <cp:head> <title><cp:pageTitle /> | <cp:siteName /></title> </cp:head> <body> </body> </html> | |||
出力結果 | <html> <head> <title>大学案内 | サイポチ大学</title> </head> <body> </body> </html> |
SEOキーワード
タグ | <cp:pageSeo /> | |||
解説 | SEOキーワードのmetaタグ。ページに設定されていない場合はサイトのSEOキーワードを挿入します。 | |||
入力例(レイアウト編集) | <html> <cp:head> <cp:pageSeo /> </cp:head> <body> </body> </html> | |||
出力結果 | <html> <head> <meta name="keywords" content="CMS,安否,シラバス,大学,学校,教育機関,ホームページ,Web" /> </head> <body> </body> </html> |
SEO概要
タグ | <cp:pageAbout /> | |||
解説 | ページ概要のmetaタグ。ページに設定されていない場合はサイトのページ概要を挿入します。 | |||
入力例(レイアウト編集) | <html> <cp:head> <cp:pageAbout /> </cp:head> <body> </body> </html> | |||
出力結果 | <html> <head> <meta name="description" content="株式会社サイポチ: 大学のためのWEBソリューションCypochi(サイポチ)" /> </head> <body> </body> </html> |
アクセス解析コード
タグ | <cp:pageAnalytics id="x"></cp:pageAnalytics> | ||
属性 | 用途 | 記述例 | |
id | アクセス解析コードのIDを指定する | {cp:pageAnalytics id="1" /} | |
解説 | サイト設定で指定したアクセス解析コードを挿入します。 | ||
入力例(レイアウト編集) | <html> <cp:head> <cp:pageAnalytics id="1"></cp:pageAnalytics> </cp:head> <body> <cp:pageAnalyticsid="2"></cp:pageAnalytics> </body> </html> | ||
出力結果 | <html> <head> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-4078659-1', 'auto'); ga('send', 'pageview'); </script> </head> <body> <script>alert('test');</script> </body> </html> |
ファビコン
タグ | <cp:favicon /> | |||
解説 | サイト設定で指定したファビコンを挿入します。 | |||
入力例(レイアウト編集) | <html> <cp:head> <cp:favicon /> </cp:head> <body> </body> </html> | |||
出力結果 | <html> <head> <link rel="shortcut icon" href="/favicon.ico" /> </head> <body> </body> </html> |
パンくずリスト
タグ | <xxx cp-type="cp-topic-path"> <xxx cp-topic-repeat="start"> <a cp-topic-href="url" cp-topic-class-suffix="folder-name" class="xxx_" cp-topic-text="directory-name"></a> </xxx> </xxx> | ||
タグ内で使用する属性 | 値 | 用途 | |
cp-topic-href | url URLを出力 | 出力するhrefの中身を指定。urlのみ | |
cp-topic-class-suffix | folder-name フォルダ名を出力 directory-name ディレクトリ名を出力 level 階層レベルを出力 | 出力するクラスの接尾文字を指定。複数指定可能。 | |
cp-topic-text | folder-name フォルダ名を出力 directory-name ディレクトリ名を出力 level 階層レベルを出力 | 出力するテキストを指定。フォルダ名、フォルダタイトル、レベルを指定可能。 | |
cp-topic-repeat | start 繰り返し開始 | - | |
解説 | トップページから表示ページまでの階層ページ一覧を表示します。 | ||
入力例(レイアウト編集) | <html> <cp:head> </cp:head> <body> <!-- パン屑リスト --> <ul class="breads" cp-type="cp-topic-path"> <li cp-topic-repeat="start" cp-topic-class-suffix="directory-name,level"> <a cp-topic-href="url" cp-topic-text="folder-name"></a></li> <li><span class="pankuzu-page"><cp:pageName /></span></li> </ul> <!-- パン屑リストここまで --> </body> </html> | ||
出力結果 | <html> <head> </head> <body> <!-- パン屑リスト --> <ul class="breads"> <li> <a href="https://www.cypochi-u.ac.jp/index.html" class="pankuzu_"> サイポチ大学 </a> </li> <li> <a href="https://www.cypochi-u.ac.jp/info/index.html" class="pankuzu_info"> 大学案内 </a> </li> <li> <span class="pankuzu-page"> 情報公開 </span> </li> </ul> <!-- パン屑リストここまで --> </body> </html> |
コンテンツID
タグ | {cp:cmsContentsId} ※「:」は半角「:」に置き換えてください。 | |||
解説 | ページのIDを挿入します。 | |||
入力例(レイアウト編集) | <div class="id-5737">id-5737</div> | |||
出力結果 | <div class="id-1">id-1</div> |
親フォルダID
タグ | {cp:parentContentsId} ※「:」は半角「:」に置き換えてください。 | |||
解説 | 直近の親フォルダのIDを挿入します。 | |||
入力例(レイアウト編集) | <div class="parent-5730">parent-5730</div> | |||
出力結果 | <div class="parent-100">parent-100</div> |
ファイル名
タグ | {cp:filename} ※「:」は半角「:」に置き換えてください。 | |||
解説 | ページのファイル名を挿入します。 | |||
入力例(レイアウト編集) | <div class="name-code">name-code</div> | |||
出力結果 | <div class="name-index">name-index</div> |
サイトURL
タグ | <xxx cp-type="cp-site-url" cp-attr="xxx" cp-suffix="xxxx"></xxx> | ||
属性 | 用途 | 記述例 | |
cp-attr | 属性名を指定する | <a cp-type="cp-site-url" cp-attr="action"></a> | |
cp-suffix | サイトURL後の接尾辞を指定する | <form cp-type="cp-site-url" cp-attr="action" cp-suffix="search.html"></form> | |
解説 | サイトURLを挿入します。 | ||
入力例(レイアウト編集) | <form cp-type="cp-site-url" cp-attr="action" cp-suffix="search.html"></form> | ||
出力結果 | <form cp-attr="action" cp-suffix="search.html" action="https://www.cypochi-u.ac.jp/search.html"></form> |
php
タグ | {cp:php}{/cp:php} ※「:」は半角「:」に置き換えてください。 | |
用途 | 記述例 | |
php用の記述 | <cp:php source=" $news_title = ''; $news_url = ''; $news_thumbnail = 'https://www.cypochi-u.ac.jp/ogimage.png'; $news_url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $url_search = ['/news/','/event/','/staging/json/','.html']; $url_replace = ['/json/','/json/','/json/','.json']; $json_url = str_replace($url_search,$url_replace,$news_url); $json = file_get_contents($json_url, false, stream_context_create($opts)); $json = mb_convert_encoding($json, 'UTF8', 'ASCII,JIS,UTF-8,EUC-JP,SJIS-WIN'); $arr = json_decode($json,true); if ($arr !== NULL) { $path_parts = pathinfo($news_url); $dir = $path_parts['dirname']; $json_id = $arr['cms_news_id']; //jsonのcms_news_id $json_title = $arr['title']; //jsonのtitle $json_thumbnail = $arr['thumbnail_file_name']; //jsonのthumbnail_file_name $news_title = str_replace(array('\r\n', '\r', '\n'), '', $json_title); if($json_thumbnail != null && $json_thumbnail != ''){ $news_thumbnail = $dir . '/albums/' . $json_id . '/' . $json_thumbnail; } } "/> <meta property="og:title" content="{cp:php} echo \$news_title; {/cp:php}" /> <meta property="og:url" content="{cp:php} echo \$news_url; {/cp:php}" /> <meta property="og:image" content="{cp:php} echo \$news_thumbnail; {/cp:php}" /> ※「:」は半角「:」に置き換えてください。 | |
解説 | php用のタグです。 | |
出力結果 | <meta property="og:title" content="入学試験実施に伴う入構制限・窓口業務について"> <meta property="og:url" content="https://www.cypochi-u.ac.jp/news/nid00012561.html"> <meta property="og:image" content="https://www.cypochi-u.ac.jp/ogimage.png"> |
サムネイルパス
タグ | {cp:thumbnailPath} | |||
解説 | サムネイルパスを挿入します | |||
入力例(レイアウト編集) | <img data-fr-src="{cp:thumbnailPath}" alt="{cp:thumbnailAltText}"> | |||
出力結果 | <img data-fr-src="/cms/sites/48/albums/view/24193" alt="サムネイルテスト2" loading="lazy"> |
サムネイルalt属性
タグ | {cp:thumbnailAltText} | |||
解説 | サムネイルalt属性を挿入します | |||
入力例(レイアウト編集) | <img data-fr-src="{cp:thumbnailPath}" alt="{cp:thumbnailAltText}"> | |||
出力結果 | <img data-fr-src="/cms/sites/48/albums/view/24193" alt="サムネイルテスト2" loading="lazy"> |
サムネイル画像
タグ | {cp:thumbnailImg} | |||
解説 | サムネイル画像を出力します | |||
入力例(レイアウト編集) | {cp:thumbnailImg} | |||
出力結果 | <img data-fr-src="/cms/sites/48/albums/view/24193" alt="サムネイルテスト2" loading="lazy"> |
おススメページ
タグ | {cp:recommends} | |||
解説 | おススメページを出力します。詳しくはこちらをご参照ください。 | |||
入力例(レイアウト編集) | {cp:recommends} | |||
出力結果 | <div class="cp-recommend-links__wrap"><div class="cp-recommend-links__item is-content"><a target="" href="/cms/sites/48/contents/pages/7596/preview"><span class="cp-recommend-links__thumb"><img alt="サムネイルテスト" data-fr-src="/cms/sites/48/albums/view/7596/abm00024194.webp"></span><span
class="cp-recommend-links__title"><span class="cp-recommend-links__title-inner">おすすめページ1</span><span class="cp-recommend-links__host">195.cypochi.com</span></span></a></div><div class="cp-recommend-links__item
is-content"><a target="" href="/cms/sites/48/contents/pages/7603/preview"><span class="cp-recommend-links__thumb"><img alt="サムネイルテスト2" data-fr-src="/cms/sites/48/albums/view/7603/abm00024193.JPG"></span><span class="cp-recommend-links__title"><span
class="cp-recommend-links__title-inner">おすすめページ2</span><span class="cp-recommend-links__host">195.cypochi.com</span></span></a></div></div> |
関連リンク
タグ | {cp:relateLinks} | |||
解説 | 関連ページを出力します。詳しくはこちらをご参照ください。 | |||
入力例(レイアウト編集) | {cp:relateLinks} | |||
出力結果 | <div class="cp-relate-links__wrap"><div class="cp-relate-links__item" data-id="7652" data-dir="/related/" data-filename="test2.html" data-contents-type="1"><a target="" href="/cms/sites/48/contents/pages/7652/preview"><span class="cp-relate-links__thumb
is-no-img"></span><span class="cp-relate-links__title"><span class="cp-relate-links__title-inner">テスト2</span></span></a></div></div> |
ニュース・イベント詳細レイアウト
ニュース・イベント詳細
タグ | <xxx cp-news-detail="xxx"></xxx> | ||
属性 | 用途 | 記述例 | |
cp-news-detail | ニュースの詳細ならnews イベントの詳細ならevent | <div cp-news-detail="news"></div> | |
タグ内で使用するタグ | 用途 | 記述例 | |
HTMLに直接記入 | {id} | ニュースID | |
{title} | ニュースタイトル | ||
{category} | カテゴリ1 表示名 | ||
{category2} | カテゴリ2表示名 | ||
{categorySlug} | カテゴリ1 スラッグ名 | ||
{category2Slug} | カテゴリ2 スラッグ名 | ||
{categoryColor} | カテゴリ1 色 | ||
{category2Color} | カテゴリ2 色 | ||
{year} | 表示日付 年 | ||
{month} | 表示日付 月 | ||
{date} | 表示日付 日 | ||
{day} | 表示日付 曜日(日本語) | ||
{dayEn} | 表示日付 曜日(英語) | ||
{description} | 概要文 | ||
{documentNumber} | 文書番号 | ||
{thumbnailImg} | サムネイルのHTML | ||
{thumbnailPath} | サムネイルのパス | ||
{thumbnailAltText} | サムネイルのaltテキスト | ||
{newsIcons} | アイコン | ||
{url} | リンクのURL | ||
{linkTitle} | リンク付きタイトル | ||
{target} | ターゲット属性 | ||
{targetBlank} | 別ウィンドウ | ||
{senderName} | 配信元部署 | ||
{signature} | 署名 | ||
{newsTags} | ニュースのタグ一覧出力 | ||
{newsTagsA prefix=""} | ニュースタグ(リンク付き) | ||
{eventSchedule} | イベント日程出力 | ||
{subjects} | 対象者 | ||
{venue} | 開催場所 | ||
{sponsorship} | 主催 | ||
{style} | スタイル設定出力 | ||
{sender} | 配信元 | ||
解説 | ニュース詳細の本文を表示します。 | ||
入力例(ブロック編集) | <!DOCTYPE html> <html lang="ja"> <cp:head> <meta charset="UTF-8"> <cp:title></cp:title> <cp:css category_code="basic" media="all"></cp:css> </cp:head> <body> <div class="content"> <div cp-news-detail="news"> <p>日付:{date}</p> <p>タイトル:{title}</p> <p>カテゴリ:{category}</p> <p>カテゴリ:{category2}</p> <p>{thumbnailImg}</p> <div>{body}</div> <div style="display: none;">{style}</div> </div> </div> <cp:component category_code="test" code="component"></cp:component> <cp:js category_code="basic" ></cp:js> </body> </html> |
INDEX