Author Topic: Parse Error foreach sponsor  (Read 1081 times)

0 Members and 1 Guest are viewing this topic.

Offline Onyx

  • New Users
  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Parse Error foreach sponsor
« on: December 10, 2013, 06:32:57 AM »
Too Confused..

Try to make a Template wich will output a List with all sponsors linked to the 2257 statements.

this is my template "custom-18USC2257.tpl"

Code: [Select]
{template file="global-header.tpl" title="_Text:USC Statement"}



    <div class="main-content page-content">
      <span class="section-whole">

        <div class="section-content">
          <div class="header">
            <span class="header-left"></span>
            <span class="header-right"></span>
            <span class="header-text">{"_Text:USC Statement"}</span>
          </div>

  Some Text <br />

  {sponsors var=$sponsors} {*get sponsor array*}
{*it says is a Parse error on this line WTF! unexpected DOT, expecting ENDclamb4TemplateDelimiter *}
  {php} print "{$sponsors}{$sponsor.name}{$sponsor.sponsor_name}"; {/php} {*test output, dosnt works!*}

  {foreach var=$sponsor from=$sponsors}
 
    <a href="{$sponsor.us2257_url}">{$sponsor.name}</a><br />

  {/foreach} {*dosnt works!*}

        </div>

      </span>
    </div>

{template file="global-footer.tpl"}


I could check that code over and over i cant see any "errors" inside this code!


DONT KNOW WHY BUT AFTER GET RID OF THE COMMENTS AND RELOAD A DOTZEND TIME; IT WORKS.. too confusing...

SORRY PLC DELETE THAT POST! THX!
« Last Edit: December 10, 2013, 06:49:46 AM by Onyx »

Offline a4evermedia

  • Global Moderator
  • Full Member
  • ***
  • Posts: 122
  • Karma: +25/-0
  • Gender: Male
    • View Profile
    • A4Ever Media
Re: Parse Error foreach sponsor
« Reply #1 on: December 10, 2013, 10:35:55 PM »
Lets keep the post for future reference.  Please modify/update/correct the post with the working code in case anyone else is interested in performing the same or similar function!   ;)

Unofficial JMB Support Forums

Re: Parse Error foreach sponsor
« Reply #1 on: December 10, 2013, 10:35:55 PM »


 

Related Topics

  Subject / Started by Replies Last post
7 Replies
4244 Views
Last post June 04, 2013, 09:09:12 AM
by scubakevin
0 Replies
898 Views
Last post July 11, 2013, 10:18:30 PM
by acmescripts
1 Replies
1192 Views
Last post March 11, 2014, 09:25:34 AM
by Tim
1 Replies
1362 Views
Last post August 06, 2014, 04:18:42 PM
by peeperd
0 Replies
1130 Views
Last post October 16, 2014, 05:28:09 PM
by swingermoney