Posted By

Alphawolf on 09/28/08


Tagged

css media field typo3 generation


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

Alphawolf
rob-ot
ascarion


Create dynamic css from media field data


 / Published in: TYPO3
 

URL: http://typo3.schloebe.de/typoscript/dynamische-css-erzeugen-aus-mediafeld-daten/

  1. css = PAGE
  2. css {
  3. typeNum = 22
  4. config {
  5. additionalHeaders = Content-type: text/css
  6. disableAllHeaderCode = 1
  7. }
  8. stdWrap.required = 1
  9. stdWrap.wrap = |
  10. 10 = TEXT
  11. 10.value (
  12. .content_header_pic {
  13. )
  14. 20 = TEXT
  15. 20.data = levelmedia: -1
  16. 20.listNum = 0
  17. 20.wrap = background: url('uploads/media/|');
  18. 30 = TEXT
  19. 30.value (
  20. border-top: 8px solid #0D337A;
  21. height: 105px;
  22. width: 100%;
  23. }
  24. )
  25. 30.if {
  26. isTrue.data = levelmedia: -1
  27. }
  28. }
  29.  
  30.  
  31.  
  32.  
  33. [...]
  34.  
  35.  
  36.  
  37. page = PAGE
  38.  
  39. page {
  40. headerData {
  41. 16 = TEXT
  42. 16.dataWrap = <link rel="stylesheet" type="text/css" href="index.php?id={field:uid}&type=22" />|
  43. }
  44. }

Report this snippet  

You need to login to post a comment.