Add breadcrumb to home page

Discussion in 'Common Questions' started by DavidOne, May 19, 2006.

  1. DavidOne

    DavidOne Paid Customer

    Hi

    I'd like the breadcrumb to appear on the home page (to prevent the 'jumping' when moving to interior pages). It should just contain '{header}'.

    I tried '{if $category.id == 0}', but that (of course) shows it on 'search', 'new links', etc.

    Any suggestions please?
  2. Vasily B.

    Vasily B. Administrator Staff Member

    Please try to use the following condition:
    Code:
    {if ($tab eq 'home') AND ($category.id eq '0')}
    your code 
    {/if}
    In this case you code will be available on index page in root category only.
  3. DavidOne

    DavidOne Paid Customer

    Perfect! Thank you, Simon. :)
  4. neominds

    neominds Paid Customer

    I also put a breadcrumb on the home page, but what I did is the following:
    I opened index.php and found the code:

    /** breadcrumb formation **/
    $breadcrumb = ($category['id'] > 0) ? $gDirLayout->print_breadcrumb($category['id']) : '';
    $gDirSmarty->assign_by_ref('breadcrumb', $breadcrumb);

    and I replaced it with:

    /** breadcrumb formation **/
    $breadcrumb = ($category['id'] > -1) ? $gDirLayout->print_breadcrumb($category['id']) : '';
    $gDirSmarty->assign_by_ref('breadcrumb', $breadcrumb);

    Like that the breadcrumb also apprears on the home page...


    Richard

Share This Page