Results 1 to 5 of 5

Thread: IF cause template bug ?!

  1. #1
    Join Date
    Nov 2006
    Posts
    56

    Default IF cause template bug ?!

    Hello,

    this IF loop force a template bug in Smarty (blank page), please can you look to it and tell me what is wrong ?

    <%if $slang EQ "de"%>
    <a href="<%$site_url%>/" class="top_menu">Forum Startseite</a> |&nbsp;
    <a href="<%$site_url%>/power_search.php" class="top_menu">Forum Suche</a> |&nbsp;
    <a href="<%$site_url%>/suggest_category.php" class="top_menu">Kategorie vorschlagen</a>&nbsp;
    <%else%>
    <a href="<%$site_url%>/" class="top_menu">Forum Home</a> |&nbsp;
    <a href="<%$site_url%>/power_search.php" class="top_menu">Forum Search</a> |&nbsp;
    <a href="<%$site_url%>/suggest_category.php" class="top_menu">Suggest Category</a>&nbsp;
    <%/if%>
    Should be an easy IF EQ ?!

    Regards
    Frank

  2. #2
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    take off the gzip page compression in setup or application.php file and it will output an error - be easier to trouble shoot. looks fine to me as well, I always use

    == instead of EQ, but other than that it looks just like a million others.

  3. #3
    Join Date
    Nov 2006
    Posts
    56

    Default where ?

    Hi,

    where can I do that ?

    By the way, I think smarty won't produce a message in case of template errors ?

    Frank

  4. #4
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    it usually outputs an error message, if the page is blank its because of the gzip page compression./ best to turn it off when yoru troubleshooting - usually its not that useful, but at least it may give a few clues. laod application.php and change

    $enable_page_compression = 1;

    to

    $enable_page_compression = 0;


    see what happens...

  5. #5
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    hi again, looks like your trying to use the variable in the header? you would probably have to make the variable available for the header.

    try your code in detail_link.html to see if it works their, if it does then this is probably the problem (although, no reason why it should cuase an error, this would just mean the If statment would always be false)

Similar Threads

  1. The Template Tag
    By ime in forum Templates
    Replies: 10
    Last Post: 05-01-2006, 11:31 AM
  2. hot template
    By Mythotical in forum Templates
    Replies: 4
    Last Post: 02-03-2005, 01:32 PM
  3. php in template
    By snaip in forum Templates
    Replies: 1
    Last Post: 10-01-2004, 04:31 AM
  4. Replies: 3
    Last Post: 04-24-2003, 04:31 PM
  5. Template
    By csengine in forum Templates
    Replies: 3
    Last Post: 04-12-2003, 07:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •