翻訳者レビュー ( 英語 → 中国語(繁体字) )
評価: 53 / 0 Reviews / 2010/08/25 23:10:34
So the CSS is very simple, but we need to define which class the page should load with, depending on the section of the site we’re in. This is really simple using MODx Revo, you can create a Template Variable for every template, set the type as ‘image’ so that admins can select images from the file browser and you can then define your <body> tag in your templates like
@CODE
You don’t want to have to do this to EVERY page on your site, that would be a painful chore (and your editors might forget) so, there’s a few options, the simplest would be to use a default value for the template variable - we uses @INHERIT for the default value of the TV, meaning that we can define the image just once at the top level.
所以CSS非常簡單,但是我們需要定義與頁面一起加載的等級,取決於我們所處的頁面部分。使用MODx Revo就非常簡單,你可以給每個模板創建多種樣式,給“圖像”設置種類,以便於管理員可以從文件瀏覽器選擇圖片並且你可以在你的模板中定義你的<body>標籤,就像@CODE。
你不想也不必在每個頁面重複這些事情,那會是非常痛苦的瑣事(而且你的編輯可能會遺忘某些步驟)所以,有一些選擇,最簡單的是針對多種模板使用默認值——我們對TV使用默認值@INHERIT,意味著我們可以只需在頂部定義一次圖片。