Advertisement:

Author Topic: Unable to get 'url' for categories under breadcrumb  (Read 617 times)

kabir

  • Newbie
  • *
  • Posts: 2
Unable to get 'url' for categories under breadcrumb
« on: August 31, 2017, 02:37:38 pm »
 $title = '<span itemprop="title">' . $this->aLevel[$i]['title'] . '</span>';
            
                if( array_key_exists('url', $this->aLevel[$i]) ) {
                    $title = '<a href="' . osc_esc_html($this->aLevel[$i]['url']) . '" itemprop="url">' . $title . '</a>';
                }
I found one issue in under Breadcrumb.cpp under sunctin render($separator = '&raquo;').


I am suspecting Above code, key 'url' is not available in array for categories under breadcrumb. Could you please help me in resolving this issue?
« Last Edit: August 31, 2017, 02:53:32 pm by kabir »

kabir

  • Newbie
  • *
  • Posts: 2
Re: Unable to get 'url' for categories under breadcrumb
« Reply #1 on: August 31, 2017, 03:35:44 pm »
Got temprary fix:
                             if($i > 0)
            {
               $l = array('url'   => osc_search_category_url());
                                         $title = '<a href="' . osc_esc_html($l['url']) . '" itemprop="url">' . $title . '</a>';
            }
                                 elseif( array_key_exists('url', $this->aLevel[$i]) ) {
                                          $title = '<a href="' . osc_esc_html($this->aLevel[$i]['url']) . '" itemprop="url">' . $title . '</a>';
                                  }

This issue will affect SEO for the category. So by the time Team OSClass provide a fix, someone can use this.

Aficionado

  • Guest
Re: Unable to get 'url' for categories under breadcrumb
« Reply #2 on: August 31, 2017, 03:56:58 pm »

This issue will affect SEO for the category. So by the time Team OSClass provide a fix, someone can use this.

No fix needed and don't worry about SEO of Osclass (that is poor, to be honest). Worry about your site's traffic (and work for it) and by the time you reach a certain level you can worry about SEO. OR if you have a big site, then a LOT of SEO changes are needed to move to the next level (possibly).

SEO doesn't affect Classified sites much since Google doesn't like the nature if it (thin or no content).

 ;)
« Last Edit: August 31, 2017, 03:58:35 pm by Aficionado »