WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

Du bist nicht angemeldet.

#1 06.10.2019 14:50:53

gawi
Mitglied

show_menu2 breadcrumb

Hi

I have problem with breadcrumb displaing (WBCE1.4)

In the template I use following code for beradcrumb:

<p class="breadcrumb">
                    <a href="<?php echo WB_URL; ?>">
                      <i class="icon-home" aria-hidden="true"></i></a> /
                    <?php show_menu2(0, SM2_ROOT+1, SM2_ALL, SM2_CRUMB, '<span class="[class]"> / [a][menu_title]</a></span>', '', '', '', '<span class="[class]">[a][menu_title]</a></span>');?>
</p>

As a result the following html code is created:

    <p class="breadcrumb">
      <a href="http://localhost:3000/mysite">
        <i class="icon-home" aria-hidden="true"></i></a> /
      <span class="menu-expand menu-parent menu-first">
        <a href="http://localhost:3000/mysite/pl/page.php" target="_top" title="Page">Page</a>
      </span>
      <span class="menu-current"> /
        <a href="http://localhost:3000/mysite/pl/page/subpage.php" target="_top" title="Subpage">Subpage</a>
      </span>
      </span>
    </p>

At the end of breadcrumb additional </span> closing tag is added and HTML validator shows error.

Can you help me to find what what is wrong with the breadcrumb code?

Best Regards
Gawi

Offline

#2 06.10.2019 16:17:05

bernd
Developer

Re: show_menu2 breadcrumb

Not sure if this is the reason, but in your SM2 call the last parameter is missing, try it this way:

show_menu2(0, SM2_ROOT+1, SM2_ALL, SM2_CRUMB, '<span class="[class]"> / [a][menu_title]</a></span>', '', '', '', '<span class="[class]">[a][menu_title]</a></span>',false);

... nein in Europa verwenden wir beim Programmieren nicht € statt $ ...

Offline

#3 06.10.2019 16:45:27

gawi
Mitglied

Re: show_menu2 breadcrumb

Thank you for answer. Unfortunately it did not helped. Still additional </span> is added at the and.

Regards Gawi

Offline

#4 06.10.2019 17:12:44

colinax
Developer

Re: show_menu2 breadcrumb

Hi gawi,

i have checked bernds code and there are no too many span elements, so the span element must be in your template.

Offline

#5 06.10.2019 18:22:39

gawi
Mitglied

Re: show_menu2 breadcrumb

ok. Thank you. I will for fault.
Regards
Gawi

Offline

#6 06.10.2019 18:32:18

colinax
Developer

Re: show_menu2 breadcrumb

Can you display the whole code from the index.php of your template?

Offline

#7 06.10.2019 19:36:46

gawi
Mitglied

Re: show_menu2 breadcrumb

I found my error.
I use breadcrumb code in two places in my template. When I corrected code in both places according to you suggestion everything it is ok.

<?php show_menu2(0, SM2_ROOT+1, SM2_ALL, SM2_CRUMB, '<span class="[class]"> / [a][menu_title]</a></span>', '', '', '', '<span class="[class]">[a][menu_title]</a></span>',false);?>

Thank you for help.

Best Regards
Gawi

Offline

Fußzeile des Forums

up