Jump to content

theme hook error for core/front/global/breadcrumb on ips 4.1.2


Xiaodidi8

Recommended Posts

Posted

found a bug, however you create any hook on template core/front/global/breadcrumb. it will get error:

Whoops \ Exception \ ErrorException (E_PARSE)

syntax error, unexpected '}'

<ul{{if $useMicrodata}} itemscope itemtype="http://schema.org/BreadcrumbList"{{endif}}>
   <li{{if $useMicrodata}} itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"{{endif}}>
      <a href='{setting="base_url"}' {{if $useMicrodata}}itemprop="url"{{endif}}>
         <span {{if $useMicrodata}}itemprop="name"{{endif}}><i class='fa fa-home'></i> {lang="home"}{{if count( \IPS\Output::i()->breadcrumb )}} <i class='fa fa-angle-right'></i>{{endif}}</span>
      </a>
   </li>
   {{$i = 0;}}
   {{foreach \IPS\Output::i()->breadcrumb as $k => $b}}
      <li{{if $useMicrodata}} itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"{{endif}}>
         {{if $b[0] === NULL}}
            {$b[1]}
         {{else}}
            <a href='{$b[0]}' {{if $useMicrodata}}itemprop="url"{{endif}}>
               <span {{if $useMicrodata}}itemprop="name"{{endif}}>{$b[1]} {{if ( $i + 1 != count( \IPS\Output::i()->breadcrumb ) )}}<i class='fa fa-angle-right'></i>{{endif}}</span>
            </a>
         {{endif}}
      </li>
      {{$i++;}}
   {{endforeach}}
</ul>

I checked this problem, found <ul{{if $useMicrodata}}  or <li{{if $useMicrodata}} need a space between <ul and {{if $useMicrodata}}

Can you fix it in next version?

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...