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.
@CODE
你不需要在網站每個頁面都這麼操作,這是很單調繁瑣的工作(你的編輯或者也會忘記的)。所以有些解決方法,其中最簡單的就是使用預設的範本變數——我們用 @INHERIT 來作為 範本變數的預設值,這就意味著我們可以一次性在頂層就對圖像作出定義。
你不想也不必在每個頁面重複這些事情,那會是非常痛苦的瑣事(而且你的編輯可能會遺忘某些步驟)所以,有一些選擇,最簡單的是針對多種模板使用默認值——我們對TV使用默認值@INHERIT,意味著我們可以只需在頂部定義一次圖片。
@CODE
您一定不希望在每個網頁上都這樣做,那可是件苦差事(而且您的編輯可能會忘記)。因此這裡有幾個選項,最簡單的是使用一個模板變量的默認值- 我們使用@INHERIT 來定義電視的默認值,這將意味著我們可以一次性地在最高水平上定義圖像。
@digitalbutter
Dear digitalbutter, thanks for your comments. I'm quite disappointed that you have already gave me the score but gave a bad rating after a long time. If you thought it's not as good as you expected, you can choose not to give me the score, then I'll know that I still need to improve!