jeongil
I'm new here

HTML-Repräsentation eines Contentbereiches zur Übertragung an externe Datenbank

Jump to solution

Hallo, folgendes Szenario:

wir haben eine Datenquelle, in der u.a. eine FS_LIST vorkommt, die mit verschiedenen Templates befüllt werden kann:

    <FS_LIST name="dt_description" hFill="yes" height="1500" rows="10">

      <DATASOURCE type="inline" maxEntries="5" useLanguages="no">

        <ACTIONS>

          <ACTION name="ADD"/>

          <ACTION name="REMOVE"/>

          <ACTION name="UP"/>

          <ACTION name="DOWN"/>

          <ACTION name="EDIT"/>

        </ACTIONS>

        <COLUMNS>

          <COLUMN show="no">#identifier</COLUMN>

        </COLUMNS>

        <LAYOUT>

          <ADD component="toolbar" constraint="top"/>

          <ADD component="overview" constraint="hide"/>

          <ADD component="stackedview" constraint="bottom"/>

        </LAYOUT>

        <TEMPLATES source="sectiontemplates">

          <TEMPLATE uid="s_textblock"/>

          <TEMPLATE uid="s_image"/>

          <TEMPLATE uid="s_headline"/>

        </TEMPLATES>

      </DATASOURCE>

      <LANGINFOS>

        <LANGINFO lang="*" label="Inhalt" description=""/>

      </LANGINFOS>

    </FS_LIST>

Soweit, so gut.

Nun soll die HTML-Ausgabe dieses Elements per Sync an eine externe Datenbank übertragen werden. Problem: in der FS-Datenbank steht natürlich nur eine Repräsentation in folgender Form:

<CMS_VALUE name="dt_description" tag="FS_LIST">

          <LANG id="§" set="1">

                    <DATA>

                              <ENTRY id="29" template="s_headline">

                                        <TEMPLATECONTENT>

                                                  <CMS_VALUE name="st_headline">

                                                            <LANG id="DE" set="1">

                                                                      <TEXT>Testartikel</TEXT>

                                                            </LANG>

                                                  </CMS_VALUE>

                                                  <CMS_VALUE name="st_subheadline">

                                                            <LANG id="DE" set="1">

                                                                      <TEXT/>

                                                            </LANG>

                                                  </CMS_VALUE>

                                                  <CMS_VALUE name="st_date">

                                                            <LANG id="DE" set="1">

                                                                      <DATE/>

                                                            </LANG>

                                                  </CMS_VALUE>

                                        </TEMPLATECONTENT>

                              </ENTRY>

                              <ENTRY id="28" template="s_textblock">

                                        <TEMPLATECONTENT>

                                                  <CMS_VALUE name="st_headline">

                                                            <LANG id="DE" set="1">

                                                                      <TEXT>safsaf</TEXT>

                                                            </LANG>

                                                  </CMS_VALUE>

                                                  <CMS_VALUE name="st_content">

                                                            <LANG id="DE" set="1">

                                                                      <DOM>

                                                                                <p>sadfasfdasfsaf</p>

                                                                      </DOM>

                                                            </LANG>

                                                  </CMS_VALUE>

                                                  <CMS_VALUE name="st_image">

                                                            <LANG id="DE" set="1">

                                                                      <UID>48913bc7fcf5cab8.jpg</UID>

                                                                      <UIDTYPE>MEDIASTORE_LEAF</UIDTYPE>

                                                                      <REMOTE/>

                                                            </LANG>

                                                  </CMS_VALUE>

                                                  <CMS_VALUE name="st_imagelink">

                                                            <LANG id="DE" set="1"/>

                                                  </CMS_VALUE>

                                                  <CMS_VALUE name="st_align">

                                                            <LANG id="DE" set="1">

                                                                      <SEL>

                                                                                <VALUE>float-left</VALUE>

                                                                      </SEL>

                                                            </LANG>

                                                  </CMS_VALUE>

                                        </TEMPLATECONTENT>

                              </ENTRY>

                              <ENTRY id="44" template="s_image">

                                        <TEMPLATECONTENT>

                                                  <CMS_VALUE name="st_image">

                                                            <LANG id="DE" set="1">

                                                                      <UID>swoosh_infochannel</UID>

                                                                      <UIDTYPE>MEDIASTORE_LEAF</UIDTYPE>

                                                                      <REMOTE/>

                                                            </LANG>

                                                  </CMS_VALUE>

                                                  <CMS_VALUE name="st_link">

                                                            <LANG id="DE" set="1"/>

                                                  </CMS_VALUE>

                                                  <CMS_VALUE name="st_caption">

                                                            <LANG id="DE" set="1">

                                                                      <TEXT/>

                                                            </LANG>

                                                  </CMS_VALUE>

                                        </TEMPLATECONTENT>

                              </ENTRY>

                    </DATA>

          </LANG>

</CMS_VALUE>

Ansatz 1:

Auslesen per DomElement von dt_description über die API: wird sehr aufwändig, da die HTML-Repräsentation jedes in Frage kommenden Templates in FS_LIST über die API nachgebaut werden müsste.

Ansatz 2:

eigenes Parsing schreiben: siehe Ansatz 1.

Hat jemand einen anderen Ansatz?

Grüße

0 Kudos
1 Solution

Accepted Solutions
Peter_Jodeleit
Crownpeak employee

Das ist über das Modul UxBridge möglich.

Wenn dir diese Lösung zu groß ist, wäre eine alternative Lösung die Datensätze "normal" zu generieren und anschließend die externe DB anhand des Generats zu befüllen.

Peter

View solution in original post

0 Kudos
1 Reply
Peter_Jodeleit
Crownpeak employee

Das ist über das Modul UxBridge möglich.

Wenn dir diese Lösung zu groß ist, wäre eine alternative Lösung die Datensätze "normal" zu generieren und anschließend die externe DB anhand des Generats zu befüllen.

Peter
0 Kudos