1

TYPO3 では、「TEXT コンテンツ/要素」としてページに箇条書きリストを追加しました。

正常に機能していますが、サイトの残りの部分でレイアウトが機能していません。箇条書きリストのレイアウトを改善できる CSS クラス「cmsms_timeline」がある場合、そのクラスを TYPO3 の UL に追加するにはどうすればよいので、「HTML」コンテンツに移動してクラスを追加する必要はありません。

CSS を追加しました。追加方法を知る必要があります。「HTML」ビューに移動してから、クラスを追加する必要がありますか? CSS ファイルから MY クラスを使用する Content 要素を取得できますか? csc-default を使用して表示できます。

<!--  CONTENT ELEMENT, uid:29/text [begin] -->
<div id="c29" class="csc-default">
<!--  Text: [begin] -->
    <ul type="disc">...</ul>
<!--  Text: [end] -->
    </div>

UDPATE

TYPO3 v. 6.1 (Fluid/Extbase) を実行しています。

こんにちは、マスター ページの TSConfig にこれを追加しようとしました。

RTE.default.contentCSS = fileadmin/templates/add/css/style.css
RTE.default.showTagFreeClasses = 1
RTE.default.proc.allowedClasses := addToList(cmsms_timeline)

スタイルシートを参照して cmsms_timeline を追加すると、箇条書きが強調表示され、ブロック スタイルでアイテムを選択できますが、cmsms_timeline が表示されません。

WEB -> Info -> Page TSconfig -> RTE の下。デフォルトでは、私が持っていることがわかります

[contentCSS] = fileadmin/templates/add/css/style.css 
[showTagFreeClasses] = 1

であるため、TSConfig から情報を取得します。

私の Style.css ファイルには、このコードが含まれています。

.cmsms_timeline {
  position:relative;
  margin:-11px 0 0 0;
  padding:0 0 37px 29px;
  list-style:none;

}

.cmsms_timeline li {
  position:relative;
  padding-top:24px;
}

.cmsms_timeline li:before,
.cmsms_timeline:before {
  position:absolute;
  top:-2px;
  left:0;
  -webkit-box-sizing:border-box;
  -moz-box-sizing:border-box;
  box-sizing:border-box;
  width:1px;
  height:28px;
  background:rgba(0, 0, 0, .08);
  content:'';
}

.cmsms_timeline:before {
  top:auto;
  bottom:11px;
  left:29px;
}

.cmsms_timeline li a {
  position:relative;
  padding-left:13px;
  -webkit-transition:all .3s ease-in-out;
  -moz-transition:all .3s ease-in-out;
  -ms-transition:all .3s ease-in-out;
  -o-transition:all .3s ease-in-out;
  transition:all .3s ease-in-out;
}

.cmsms_timeline li a:hover {padding-left:19px;}

.cmsms_timeline li a:before {
  position:absolute;
  top:5px;
  left:-2px;
  width:5px;
  height:5px;
  -webkit-border-radius:50%;
  -moz-border-radius:50%;
  border-radius:50%;
  background:rgba(0, 0, 0, .2);
  content:'';
  -webkit-transition:background .3s ease-in-out;
  -moz-transition:background .3s ease-in-out;
  -ms-transition:background .3s ease-in-out;
  -o-transition:background .3s ease-in-out;
  transition:background .3s ease-in-out;
}

何が恋しいの?

4

2 に答える 2

1

The standard RTE editor (rtehtmlarea) can populate the class list by parsing a CSS file that you set for it so all you need to do is to define ul.cmsms_timeline in that CSS file. What the manual says:

The CSS file that contains the style definitions that should be applied to the edited contents. The selectors defined in this file will also be used in the block style and text style selection lists.

Example of the configuration:

RTE.default.contentCSS = fileadmin/template/rte.css

The setting is to be inserted to the TSconfig field in the (preferably root) page properties. You can open the WEB -> Info -> Page TSconfig -> RTE. to review all the RTE settings. Note that each database table might have its own configuration (e.g. RTE.tt_content.) so make sure that your default setting is not overridden for a particular table.

Also note that after every change of the file you MIGHT need to open this file in your browser or clear the browser's cache. This is to make sure that your browser caches the current version of the file and thus that the RTE would use it.

Once that is set, you can simply assign the class in the RTE by selecting it from the "Block style" select box after you...

a) ...highlight all the list items.

b) ...click on ul in Path: body » ul » li which is displayed at the bottom of the RTE once you click on any list item.

于 2013-10-22T15:27:54.040 に答える
1

RTE には、リスト用に定義済みの 2 つのクラスがあります:action-itemsおよびcomponent-items(action-items-orderedおよびcomponent-items-orderedOL リスト用)。スタイルシートでそれらを採用するのが最も簡単です (自分の宣言を 1 つにコピーするだけですcmsms_timeline)。

クラスをリスト全体に設定するには、マウスですべての項目を選択するだけで、RTE はブロック スタイルの選択を有効にします。

PS。カスタム/追加のクラスを追加するには多くの労力が必要で、Google で
typ3 rte カスタム ブロック スタイル」として簡単に見つけることができますが、迅速なスタイリングのためには、努力する価値があるとは思いません。

于 2013-10-22T14:31:21.937 に答える