10. 06. 2010, 11:48

Hallo Leute,

ich beiße mir nun schon seit einigen Tagen die Zähne daran aus eine XML-Datei aus dem Menübaum zu erstellen. Die XML-Datei muss folgendes Format aufweisen:

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <navigation>
  3. <menu title="REH AKTIV" color="0xff4000">
  4. <item caption="AMBULANTE REHABILITATION" link="empty.html" target="_self" />
  5. <item caption="SPORT" link="empty.html" target="_self">
  6. <menu title="SPORT Varianten">
  7. <item type="link" caption="SPORT Varianten 1" link="empty.html" target="_self" />
  8. <item type="link" caption="SPORT Varianten 2" link="empty.html" target="_self" />
  9. <item type="link" caption="SPORT Varianten 3" link="empty.html" target="_self" />
  10. </menu>
  11. </item>
  12. <item caption="WELLNESS" link="empty.html" target="_self" />
  13. <item caption="BODYMED" link="empty.html" target="_self">
  14. <menu title="BODYMED Varianten">
  15. <item caption="BODYMED Varianten 1" link="empty.html" target="_self" />
  16. <item caption="BODYMED Varianten 2" link="empty.html" target="_self" >
  17. <menu title="BODYMED weitere Varianten">
  18. <item type="link" caption="BODYMED weitere Varianten 1" link="empty.html" target="_self" />
  19. <item type="link" caption="BODYMED weitere Varianten 2" link="empty.html" target="_self" />
  20. <item type="link" caption="BODYMED weitere Varianten 3" link="empty.html" target="_self" />
  21. </menu>
  22. </item>
  23. <item caption="BODYMED Varianten 3" link="empty.html" target="_self" />
  24. </menu>
  25. </item>
  26. <item caption="DAS TEAM FÜR SIE" link="empty.html" target="_self" />
  27. <item caption="VIRTUELLE TOUR" link="empty.html" target="_self" />
  28. </menu>
  29. </navigation>

Das ganze wollte ich einfach über ein HMENU erstellen. Doch leider bringt keine meiner Versuche dieses Ergebnis.

title im <menu> soll der Seitentitel der übergeordneten Seite sein.
caption = Seitentitel

Mein letzter Ansatz scheitert an falsch verschatelten Tags.

  1. ##############################
  2. #### temp.xmlMenu
  3. ##############################
  4.  
  5. temp.xmlMenu.wrap =<navigation>|</navigation>
  6. temp.xmlMenu = HMENU
  7. temp.xmlMenu {
  8. entryLevel = 0
  9. 1 = TMENU
  10. 1 {
  11. wrap =<menu title="{$levelTitle_1}" color="{$levelColor_1}">|</menu>
  12. expAll = 1
  13. NO = 1
  14. NO.doNotLinkIt = 1
  15. NO.stdWrap.dataWrap =<item caption="|" link="{field:uid}.0.html" target="_self" />
  16. NO.wrapItemAndSub = |
  17. IFSUB< .NO
  18. IFSUB = 1
  19. IFSUB.allWrap.wrap = |</item>
  20.  
  21. }
  22. 2< .1
  23. 2 {
  24. wrap =<menu title="{$levelTitle_2}" color="{$levelColor_2}">|</menu>
  25. }
  26. }
  27.  
  28.  
  29. # typeNum = 555
  30. config {
  31. disableAllHeaderCode = 1
  32. additionalHeaders = Content-type:text/xml
  33. admPanel = 0
  34. }
  35. }
  36. PAGE.10 < temp.xmlMenu

Kann mir jemand helfen?

Danke im voraus