We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23050
    • 1,842 Posts
    Hi dvancouver,

    You should replace " ? " by |xq| and " = " by |xe| in your url
      • 8254
      • 15 Posts
      Ah Perrine, many thanks:) Modx is like it’s own programming language:)
        • 23050
        • 1,842 Posts
        u’re welcome wink
          • 18830
          • 161 Posts
          I was looking for a RDF/RSS format that fits for complex calenders to exchange . There are several proposals and drafts in the wild but xCal seems to be the most versatile http://tools.ietf.org/html/draft-royer-calsch-xcal-03. upcoming.org is using it.

          This is an example:

          <?xml version="1.0" encoding="utf-8"?>
          <rss version="2.0" 
          xmlns:dc="http://purl.org/dc/elements/1.1/"
          xmlns:xCal="urn:ietf:params:xml:ns:xcal"
          xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
          >
          <channel>
          
          	<title>Titel des Kalender-Feeds</title>
              	<link>http://link-zum-kalender.de/</link>
          	<description>Beschreibung des Kalenders</description>
          
          	<language>de</language>
              
          	<item>
          
              		<title>Titel der Veranstaltung</title>
          		<description><![CDATA[Beschreibung der Veranstaltung]]></description>
          		<link>http://link-zur-veranstaltung/01</link>
          		
          
          		<guid>http://link-zur-veransataltung/01</guid>
              
              		<pubDate>Sat, 17 Nov 2007 08:54:07 -0700</pubDate>
              		<dc:date>2007-11-17T08:54:07-07:00</dc:date>
              
          		<xCal:summary>Titel der Veranstaltung</xCal:summary>
              		<xCal:dtstart>2008-03-01T09:00:00Z</xCal:dtstart>
              		<xCal:dtend>2008-03-02T18:00Z</xCal:dtend>
              		<xCal:location>http://link-zur-veranstaltung/01</xCal:location>
              		<xCal:x-calconnect-venue>
               			<xCal:x-calconnect-venue-id>http://upcoming.yahoo.com/venue/98890/</xCal:x-calconnect-venue-id>
               				<xCal:adr>
                					<xCal:x-calconnect-venue-name>Veranstalter</xCal:x-calconnect-venue-name>
                					<xCal:x-calconnect-street>Straße</xCal:x-calconnect-street>
                					<xCal:x-calconnect-city>Ort</xCal:x-calconnect-city>
                					<xCal:x-calconnect-region>Region</xCal:x-calconnect-region>
                					<xCal:x-calconnect-postalcode>00000</xCal:x-calconnect-postalcode>
                					<xCal:x-calconnect-country>Land</xCal:x-calconnect-country>
               				</xCal:adr>
               				<xCal:url type='Venue Website'>http://link-zur-veranstaltung/01</xCal:url>
               		<xCal:x-calconnect-tel>000-1234567</xCal:x-calconnect-tel>
              		</xCal:x-calconnect-venue>
              </item>
          
            </channel>
          </rss>
          


          I wrote a template for FeedX:

          outer.tpl

          {{RSS->inner}}
          


          inner.tpl

          {{CHANNEL->channel}}
          <ul>
          {{ITEM->item}}
          </ul>
          


          channel.tpl

          <a href="[+LINK+]">[+TITLE+]</a>
          


          item.tpl

          <li><a href="[+LINK+]" title="Posted on [+PUBDATE+]">[+TITLE+] - [+DESCRIPTION+]</a></li>
          
          <li><b>Veranstaltung:</b> [+TITLE+]</li>
          <li><b>Beschreibung:</b> [+DESCRIPTION+]</li>
          <li><b>Link:</b> [+LINK+]</li>
          
          <li><b>Veranstaltungsort:</b> [+XCAL|X-CALCONNECT-VENUE-NAME+]</li>
          <li><b>Straße:</b> [+XCAL|X-CALCONNECT-VENUE-STREET+]</li>
          <li><b>Stadt:</b> [+XCAL|X-CALCONNECT-VENUE-CITY+]</li>
          <li><b>Region:</b> [+XCAL|X-CALCONNECT-VENUE-REGION+]</li>
          <li><b>PLZ:</b> [+XCAL|X-CALCONNECT-VENUE-POSTALCODE+]</li>
          <li><b>Land:</b> [+XCAL|X-CALCONNECT-VENUE-COUNTRY+]</li>
          <li><b>Beginn:</b> [+XCAL|X-CALCONNECT-VENUE-START+]</li>
          <li><b>Ende:</b> [+XCAL|X-CALCONNECT-VENUE-END+]</li>
          


          And this is the snippet call:

          [!FeedX? &url=`http://modx.elbwiese.net/xcal.xml` &preset=`xcal` &usePhx=`1` &cacheTime=`10` &userPH=`X-CALCONNECT-VENUE-NAME->x-calconnect-venue-name,X-CALCONNECT-VENUE-STREET->x-calconnect-venue-street,X-CALCONNECT-VENUE-CITY->x-calconnect-venue-city,X-CALCONNECT-VENUE-REGION->x-calconnect-venue-region,X-CALCONNECT-VENUE-POSTALCODE->x-calconnect-venue-postalcode,X-CALCONNECT-VENUE-COUNTRY->x-calconnect-venue-country,X-CALCONNECT-VENUE-START->x-calconnect-venue-start,X-CALCONNECT-VENUE-END->x-calconnect-venue-end` &maxElements=`5` &debug=`1`!]
          


          But only the title of the channel shows up.

          Maybe someone can have a look at this page: http://modx.elbwiese.net/xcalendar and give me an advice. The debugger is on.

          Thank you all.
            • 14050
            • 788 Posts
            inner.tpl should be:

            {{CHANNEL->channel}}


            channel.tpl is where you can access the item, as items are children of the channel. So channel.tpl should be:

            <a href="[+LINK+]">[+TITLE+]</a>
            <ul>
            {{ITEM->item}}
            </ul>
              Jesse R.
              Consider trying something new and extraordinary.
              Illinois Wine

              Have you considered donating to MODx lately?
              Donate now. Every contribution helps.
              • 18830
              • 161 Posts
              channel.tpl is where you can access the item, as items are children of the channel.

              Well, I see, Jesse R., thank you. Now it works - kind of.

              Looking at the structure of xCal there some more children. Here is the (simplified) structure.


              <item>
                    <title>Title</title>
                    ...
                    <xCal:dtstart>2008-03-01T09:00:00Z</xCal:dtstart>
                    <xCal:x-calconnect-venue>
                          <xCal:x-calconnect-venue-id>ID/</xCal:x-calconnect-venue-id>
                          <xCal:adr>
                                <xCal:x-calconnect-venue-name>Venue</xCal:x-calconnect-venue-name>
                          </xCal:adr>
                          <xCal:x-calconnect-tel>000-1234567</xCal:x-calconnect-tel>
                    </xCal:x-calconnect-venue>
              </item>
              
              There a whole bunch of children ;)
              
              So this is what I tried:
              
              item.tpl
              
              
              <li><a href="[+LINK+]" title="Posted on [+PUBDATE+]">[+TITLE+] - [+DESCRIPTION+]</a></li>
              <li>[+TITLE+]</li>
              ...
              {{XCAL|X-CALCONNECT-VENUE->venue}}
              <br /><br /><br />should call venue.tpl<br /><br />

              <li>[+XCAL|X-CALCONNECT-TEL+]</li>

              {{XCAL|ADR->venuedetail}}
              <br /><br />and this at least venuedetail.tpl<br /><br />

              <li>[+XCAL|X-CALCONNECT-VENUE-STREET+]</li>
              ...
              <br /><br />Unfortunately only item.tpl is called. If I use userPH parameter X-CALCONNECT-VENUE->x-calconnect-venue doesn´t change anything. The debug console recognizes the children anyway. I am lost.<br />
                • 14050
                • 788 Posts
                I don’t immediately see anything wrong with your logic. If you don’t have it figured out by tomorrow, post back here as I will have some more free time to investigate.
                  Jesse R.
                  Consider trying something new and extraordinary.
                  Illinois Wine

                  Have you considered donating to MODx lately?
                  Donate now. Every contribution helps.
                  • 18830
                  • 161 Posts
                  Thank you, Jesse R. I tried it again - no luck. For example I moved childs of xCal:adr up to item. Nothing. With one exception: if I make xCal:x-calconnect-venue-id a child of item, the ID will be displayed, even when I don´t define a personal placeholder.

                  What is even more confusing: The debug box shows all placeholders and templates.

                  It is just a guess (I know nearly nothing about PHP): Could it be that the dashes in the element´s name cause the trouble?
                    • 14050
                    • 788 Posts
                    There was originally a problem with xml tags that had the ’:’ character in them as talked about here:

                    On the first page of this thread. I imagine it might have to do something with that. Do you have PHx installed? Could you try disabling it and seeing that resolves the issues. If not, I will try to look into it tomorrow.
                      Jesse R.
                      Consider trying something new and extraordinary.
                      Illinois Wine

                      Have you considered donating to MODx lately?
                      Donate now. Every contribution helps.
                      • 18830
                      • 161 Posts
                      Quote from: Jesse at Dec 09, 2007, 07:51 PM

                      There was originally a problem with xml tags that had the ’:’ character ... Do you have PHx installed? Could you try disabling it and seeing that resolves the issues.

                      I disabled PHx. Nevertheless the venue and rthe venuetemplate won´t be called. sad