Advertisement
b0r7

typoscript - globalvar for file property2

Feb 11th, 2014
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. /*
  2. ****************************************************************** WORKING
  3. */
  4.  
  5. # temp.slideshow
  6. #############################################
  7. temp.slideshow = COA
  8. temp.slideshow {
  9. 1 = COA
  10. 1{
  11. stdWrap.required = 1
  12. stdWrap.outerWrap.cObject = TEXT
  13. stdWrap.outerWrap.cObject.value = <img src="{$constant.baseurl}/| " />
  14. 2 = IMG_RESOURCE
  15. 2{
  16. file{
  17. import.data = levelmedia:-1, slide
  18. import.listNum = 0
  19. treatIdAsReference = 1
  20. width = 900
  21. height = 300
  22. }
  23. }
  24. }
  25. 2 < .1
  26. 2.2.file.import.listNum = 1
  27. 3 < .1
  28. 3.2.file.import.listNum = 2
  29. 4 < .1
  30. 4.2.file.import.listNum = 3
  31. 5 < .1
  32. 5.2.file.import.listNum = 4
  33. }
  34. #------------------- exception frontpage
  35. temp.slideshowFront = COA
  36. temp.slideshowFront {
  37. 1 = COA
  38. 1{
  39. stdWrap.required = 1
  40. stdWrap.outerWrap.cObject = TEXT
  41. stdWrap.outerWrap.cObject.value = <img src="{$constant.baseurl}/| " />
  42. 2 = IMG_RESOURCE
  43. 2{
  44. file{
  45. import.data = levelmedia:-1, slide
  46. import.listNum = 0
  47. treatIdAsReference = 1
  48. width = 900
  49. height = 450
  50. }
  51. }
  52. }
  53. 2 < .1
  54. 2.2.file.import.listNum = 1
  55. 3 < .1
  56. 3.2.file.import.listNum = 2
  57. 4 < .1
  58. 4.2.file.import.listNum = 3
  59. 5 < .1
  60. 5.2.file.import.listNum = 4
  61. }
  62.  
  63. /* other code */
  64. #------------------------ slideshowMarks
  65. [globalVar = TSFE:id=1]
  66. temp.mainTemplate.marks.SLIDER < temp.slideshowFront
  67. [else]
  68. temp.mainTemplate.marks.SLIDER < temp.slideshow
  69. [end]
  70.  
  71.  
  72. /*
  73. **************************************************** NOT WORKING
  74. */
  75. temp.slideshow = COA
  76. temp.slideshow {
  77. 1 = COA
  78. 1{
  79. stdWrap.required = 1
  80. stdWrap.outerWrap.cObject = TEXT
  81. stdWrap.outerWrap.cObject.value = <img src="{$constant.baseurl}/| " />
  82. 2 = IMG_RESOURCE
  83. 2{
  84. file{
  85. import.data = levelmedia:-1, slide
  86. import.listNum = 0
  87. treatIdAsReference = 1
  88. width = 900
  89. height = 300
  90. }
  91. }
  92. }
  93. 2 < .1
  94. 2.2.file.import.listNum = 1
  95. 3 < .1
  96. 3.2.file.import.listNum = 2
  97. 4 < .1
  98. 4.2.file.import.listNum = 3
  99. 5 < .1
  100. 5.2.file.import.listNum = 4
  101. }
  102. [globalVar = TSFE:id=1]
  103. temp.slideshow.1.2.file.height = 450
  104. [else]
  105. temp.slideshow.1.2.file.height = 300
  106. [end]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement