Quantcast
Channel: Hyperblue's Blog » Typo3
Viewing all articles
Browse latest Browse all 10

Typo3基本TS应用

$
0
0

必须有Templavoila插件支持, 另外涉及tt_news,pagebanner等插件的独立配置.
其中涉及到:网站全局配置(config) 页面head部分,包含的css/js,logo,banner,sitemap,主导航菜单,顶部菜单,底部菜单,多语言等配置.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
page = PAGE
page.typeNum = 0
page.10 = USER
page.10.userFunc = tx_templavoila_pi1->main_page
config {
    ######### cache #########  
    index_enable=1
    no_cache = 0
    ######### cache #########
    #### meta charset ####  
    metaCharset = utf-8         
    ######################
    noPageTitle=1
    ########## AW state #############
    stat = 0
    debug = 1
    stat_apache = 0
    stat_apache_logfile = logs.log
    #################################
 
    ######### Real Url #############
    #config.baseURL = 1
    baseURL = http://localhost/typo3/
    prefixLocalAnchors = all
    tx_realurl_enable = 1
    stat_apache_pagenames = [realurl]
    ################################
 
}
 
######## ADD CSS and JS BEGIN#######
 
page.includeCSS {
   file0 = fileadmin/templates/inc/css/typo3.css
   file1 = fileadmin/templates/inc/css/global.css
   file1.media = screen
   file2 = fileadmin/templates/inc/css/jquery.fancybox.css
   #file3 = typo3conf/ext/tt_news/res/tt_news_v2_styles.css
}
 
page.includeJS {
  file1 = fileadmin/templates/inc/javascript/jquery-1.3.2.min.js
 file2 = fileadmin/templates/inc/javascript/jquery.fancybox-1.2.1.js
  file3 = fileadmin/templates/inc/javascript/jquery.easing.1.3.js
  file10 = fileadmin/templates/inc/javascript/common.js
}
####################################
######## XHTML #####################
#page.config.doctype = xhtml_trans
page.config.doctype = xhtml_strict
page.config.xmlprologue = none
page.config.htmlTag_setParams =  xmlns="http://www.w3.org/1999/xhtml"
####################################
 
page.headerData.10 = TEXT
#page.headerData.10.value =
page.headerData.10.data = page : title
page.headerData.10.wrap = <title>marslight-|</title>
page.headerData.10.stdWrap.htmlSpecialChars = 1
 
page.meta{
    keywords.field = keywords
    keywords.ifEmpty (
      Test keywords
    )
    description.field = description
    description.ifEmpty(
      Test description
    )
 
     author.field = author
     abstract.field = abstract
     language = de
     revisit-after = 14 days
     robots = all
     #page-type = page-type
     #page-topic = Der Paritaetische
}
#############################################
######## LOGO begin #########################
ts_logo = IMG_RESOURCE
ts_logo {
  file = fileadmin/templates/images/logo.jpg
  #file.width = 200
  stdWrap.wrap = <div id="logo"><a href='./'><img title="" alt="" src="|"></a></div>
  }
######## LOGO end ##########################
 
 
 
########### fe_login##############
plugin.tx_felogin_pi1{
    email_from = test@test.de
    email_fromName = Projekt marslight
}
##################################
 
 
 
################# Banner ########################
ts_banner = USER
ts_banner.userFunc = tx_extpagebanner_pi1->main
ts_banner.rootpage = 2
#################################################
 
plugin.tx_extnews_pi1.cutstrlength = 99999
 
 
 
 
 
######Navigation######
 
######### Main Menu #########################
#includeLibs.gtmenu_class = fileadmin/gtmenu.txt
ts_top_menu = HMENU
ts_top_menu{
  entryLevel = 0
  1=TMENU
  1{
    noBlur = 1
    #expAll = 1   #sub menu all show
    wrap = <ul>|</ul><div id="dot"></div><div class="clear"></div>
    #NO.wrapItemAndSub = <li onmouseover="show(this)" onmouseout="hide(this)">|</li>
    #NO.wrapItemAndSub = <li>|</li>
    NO.stdWrap.htmlSpecialChars = 1
    #NO.wrapItemAndSub = |</li>
    #NO.allWrap.dataWrap=<li id="subMenu{field:uid}">|
    NO.allWrap.dataWrap= <li>|
    NO.wrapItemAndSub = |</li>
    NO.ATagParams.dataWrap =  title="{field:title}"
 
    ACT < NO
    ACT = 1
    ACT.linkWrap = <li class="current">|</li>
    ACT.ATagParams = class="current"  
    ACT.ATagParams.dataWrap =  title="{field:title}"
    ACT.ATagParams.dataWrap = id="current"
  }
}
 
ts_main_menu = COA
ts_main_menu.10 < ts_top_menu
#######################################################
 
 
 
############# Top Link####################
ts_top_link = COA
ts_top_link {
  10 = HMENU
  10 {
    special = directory
    special.value = 21
    #1 = JSMENU  
    #1.target=_top  
    #1.firstLabelGeneral =quickjump to snip
    1 = TMENU
    1 {
      noBlur = 1
      wrap = <ul>|</ul>
      NO {
       linkWrap = |&nbsp;&nbsp;&#124;&nbsp;&nbsp;|*| |&nbsp;&nbsp;&#124;&nbsp;&nbsp; |*||&nbsp;&#124;&nbsp;
        allWrap = <li>|</li>
        stdWrap.htmlSpecialChars = 1
        ATagParams.dataWrap = title="{field:title}"
      }
 
      ACT < NO
      ACT = 1
      ACT.linkWrap = <li id="current">|</li>
      #ACT.ATagParams = class="current"
      ACT.ATagParams.dataWrap = title="{field:title}"
 
    }#
  }
 
}
#################################################
 
############# Bottom link ####################
ts_bottonLinks = COA
ts_bottonLinks {
  10 = HMENU
  10 {
    special = language
    special.value = 0,1,2
    1 = GMENU
    1 {
      NO {
        XY = [5.w]+4, [5.h]+4  
        backColor = white  
        5 = IMAGE  
        5.file = media/flags/flag_de.gif  || media/flags/flag_fr.gif  || media/flags/flag_es.gif   
        5.offset = 2,2
      }
 
      ACT < .NO
      ACT = 1
      ACT.backColor = black
 
      USERDEF1 < .NO
      USERDEF1 = 1
      USERDEF1.5.file = media/flags/flag_de.gif  || media/flags/flag_fr_d.gif  || media/flags/flag_es_d.gif
      USERDEF1.noLink = 1      
    }
  }
}
#################################################
 
############# Bottom link ####################
ts_footer = TEXT
ts_footer.value = <p>@ Copyright  Power by <a href="http://www.kushu.net">hyperblue</a></p
#################################################
 
################# NEWS #################
temp.strftime = %d.%m.%Y
temp.strftime_latest = %d.%m.%Y
################# NEWS #################
 
#################### tt_news sideBar ####################
plugin.tt_news {
  displayCatMenu {
 
    #nestedWraps mode
    mode = nestedWraps
    #catmenuNoRootIcon = 0
    # -1 no image
    catmenuIconMode = -1
    #catmenuHeader_stdWrap.wrap = <li>|<li>
    catmenu_stdWrap.wrap = <ul> | </ul>
    catmenuLevel0_stdWrap.wrap = <li> | </li>
    catmenuLevel1_stdWrap.wrap = <li> | </li>
  }
}
###########################################################
 
#################### site map ####################
ts_position=HMENU
ts_position.special=rootline
ts_position.special.range= 0 | -1
ts_position.wrap = <ul>|</ul>
ts_position.1=TMENU
ts_position.1{
   NO.allWrap=<span>|&nbsp;&raquo;&nbsp;</span>|*|<span>|&nbsp;&raquo;&nbsp;</span>|*| <spanclass="current">|</span>
    NO.doNotLinkIt=|*| |*| 1   #No Link in the last node
    NO.stdWrap.htmlSpecialChars = 1
}
###########################################################
 
#################################################
#ts_bcn = USER
#ts_bcn.userFunc = tx_extquicklink_pi1->main
 
 
 
############# bcn ####################
#ts_bcn=HMENU
#ts_bcn.special=rootline
#ts_bcn.special.range= 0 | -1
#ts_bcn.wrap = <ul>|</ul>
#ts_bcn.1=TMENU
#ts_bcn.1{
#    NO.allWrap= <li>|&nbsp;&raquo;&nbsp;</li>|*|<li>|&nbsp;&raquo;&nbsp;</li> |*| <li class="current">|</li>
#    NO.doNotLinkIt=|*| |*|    #No Link in the last node
#    NO.stdWrap.htmlSpecialChars = 1
# }
 
#################################################
####### Multiple Languages ####
config.linkVars = L
config.sys_language_uid = 0
config.sys_language_overlay = 1
 
############ Current LANGUAGE Navigation ####################
#currentlanguage = TEXT
#currentlanguage.value = Sprachauswahl/Language
 
##################################################
[globalVar = GP:L=0]
        config.sys_language_uid = 0
        config.language = de
        config.locale_all = de-de
        config.htmlTag_langKey = de-de
 
[global]
 
[globalVar = GP:L=1]
        config.sys_language_uid = 1
        config.language = cn
        config.locale_all = cn-zh
        config.htmlTag_langKey = cn-zh
 
[global]
 
[globalVar = GP:L = 2]
    config.sys_language_uid = 2
    config.language = en
        config.locale_all = en-EN
        config.htmlTag_langKey = en-EN
 
 
[global]
 
ts_bcn = HMENU
ts_bcn {
   special = language
   special.value = 0,1,2
   special.normalWhenNoLanguage = 1
   1 = TMENU
   1 {
        # Normal link to language that exists:
          NO = 1  #set Current language
          NO {
          # allWrap = |&nbsp;&#124;&nbsp;|*| |&nbsp;&#124;&nbsp; |*| |
            linkWrap = <li>|</li>
            stdWrap.setCurrent = German || China || English
            stdWrap.current = 1
          }
 
        # Current language selected:
        ACT < .NO
        ACT.linkWrap = <li class='current'> | </li>
 
 
 
        #Language that is NOT available:
         USERDEF1 < .NO
         USERDEF1.linkWrap = <li> | </li>
         USERDEF1.doNotLinkIt = 1
      }
 
 }

Viewing all articles
Browse latest Browse all 10

Trending Articles