• Resolved profilpr

    (@profilpr)


    Hi there,

    i got the following problem:

    i did a website, there are 3 different mainmenu-points and each of them got an menupoint called “NEWS” and a specified color. i want to color the Breadcrumb in the color of the mainmenu-point but the Problem is that i cant get different classes for each menupoint

    i did change the site template to this
    “<span class=”breadcrumb %title%”><span typeof=”v:Breadcrumb”>%htitle%</span></span>”

    but when i do this i can’t color the home Link and i get the class “NEWS” in each main menu-point

    I’m sorry, I’m not that good in english.

    https://ww.wp.xz.cn/plugins/breadcrumb-navxt/

Viewing 1 replies (of 1 total)
  • Plugin Author John Havlik

    (@mtekk)

    I wouldn’t use %title% within a class since it is not guaranteed to generate safe class names. Instead, consider using %type%, which will output some specific classes for the specific breadcrumb. However, if you are looking for something more specific, you will want to create your own template tag. To do this, you need to hook into the bcn_template_tags filter and append your template tag as the key and the replacement value as the value to the passed in $replacements array.

    However, note that if the NEWS menu item is the same thing in each case (same category/page/etc) then you’ll likely have issues differentiating between the different ones. One solution may be to use the Breadcrumb NavXT Menu Magic extension plugin, but I do not remember if it will give you the ID you need (which would be for the menu item rather than the resource it represents) in the bcn_template_tags filter.

Viewing 1 replies (of 1 total)

The topic ‘Post Parent Items’ is closed to new replies.