Zum Inhalt springen

Menü XML-Export für Flash

Erstellt am 10. Juni 2010 · Noch keine Antworten

Tags: Import & Export, Frage

dfluess ·

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:

<?xml version="1.0" encoding="utf-8"?>
<navigation>
  <menu title="REH AKTIV" color="0xff4000">
    <item caption="AMBULANTE REHABILITATION" link="empty.html" target="_self" />
    <item caption="SPORT" link="empty.html" target="_self">
      <menu title="SPORT Varianten">
        <item type="link" caption="SPORT Varianten 1" link="empty.html" target="_self" />
        <item type="link" caption="SPORT Varianten 2" link="empty.html" target="_self" />
        <item type="link" caption="SPORT Varianten 3" link="empty.html" target="_self" />
      </menu>
    </item>
    <item caption="WELLNESS" link="empty.html" target="_self" />
    <item caption="BODYMED" link="empty.html" target="_self">
      <menu title="BODYMED Varianten">
        <item caption="BODYMED Varianten 1" link="empty.html" target="_self" />
        <item caption="BODYMED Varianten 2" link="empty.html" target="_self" >
          <menu title="BODYMED weitere Varianten">
            <item type="link" caption="BODYMED weitere Varianten 1" link="empty.html" target="_self" />
            <item type="link" caption="BODYMED weitere Varianten 2" link="empty.html" target="_self" />
            <item type="link" caption="BODYMED weitere Varianten 3" link="empty.html" target="_self" />
          </menu>
        </item>
        <item caption="BODYMED Varianten 3" link="empty.html" target="_self" />
      </menu>
    </item>
    <item caption="DAS TEAM FÜR SIE" link="empty.html" target="_self" />
    <item caption="VIRTUELLE TOUR" link="empty.html" target="_self" />
  </menu>
</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.

##############################
#### temp.xmlMenu
##############################

temp.xmlMenu.wrap =<navigation>|</navigation>
temp.xmlMenu = HMENU
temp.xmlMenu {
entryLevel = 0
1 = TMENU
1 {
wrap =<menu title="{$levelTitle_1}" color="{$levelColor_1}">|</menu>
expAll = 1
NO = 1
NO.doNotLinkIt = 1
NO.stdWrap.dataWrap =<item caption="|" link="{field:uid}.0.html" target="_self" />
NO.wrapItemAndSub = |
IFSUB< .NO
IFSUB = 1
IFSUB.allWrap.wrap = |</item>

}
2< .1
2 {
wrap =<menu title="{$levelTitle_2}" color="{$levelColor_2}">|</menu>
}
}


PAGE = PAGE
PAGE {
# typeNum = 555
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:text/xml
admPanel = 0
}
}
PAGE.10 < temp.xmlMenu

Kann mir jemand helfen?

Danke im voraus