rejetto forum

minor bug with {{breadcrumbs}}

Mars · 2 · 4440

0 Members and 1 Guest are viewing this topic.

Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2063
    • View Profile
default template

Quote
{{breadcrumbs|{{\<a href="%bread-url%">{{if|{{%bread-name%=}}|Home|%bread-name%}}/</a> /}} }}</div>

result in Macros.log
Quote
<div id=folder>
   > {{!folder}}
   < folder

> {{breadcrumbs|{{\<a href="%bread-url%">{{if|{{%bread-name%=}}|Home|%bread-name%}}/</a>/}} }}
   < <a href="/">{{if|{{=}}|Home|}}/</a><a href="/HUMOUR/">{{if|{{HUMOUR=}}|Home|HUMOUR}}/</a><a href="/HUMOUR/Photos/">{{if|{{Photos=}}|Home|Photos}}/</a>

   > {{=}}
   < <div class=macroerror>macro error: =<br>not supported or wrong number of parameters</div>

   > {{if|<div class=macroerror>macro error: =<br>not supported or wrong number of parameters</div>|Home|}}
   < Home

   > {{!user}}
   < user

remove {{\ and /}}

Quote
<div id=folder>{{breadcrumbs|<a href="%bread-url%">{{if|{{%bread-name%=}}|Home|%bread-name%}}/</a> </div>

after change
Quote
   > {{!folder}}
   < folder
   > {{%bread-name%=}}
   <

   > {{if||Home|%bread-name%}}
   < %bread-name%

   > %bread-name%
   < %bread-name%

   > {{breadcrumbs|<a href="%bread-url%">%bread-name%/</a> }}
   < <a href="/">/</a><a href="/HUMOUR/">HUMOUR/</a><a href="/HUMOUR/Photos/">Photos/</a>

   > {{!user}}
   < user


and then all is right


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13521
    • View Profile
Thank you mars!

it's fun that it works anyhow :D
but it must be fixed

The bug is not in the template.
It's in the parser.
By removing the quoting "Home" is never shown.
« Last Edit: January 10, 2008, 02:05:48 AM by rejetto »