diff --git a/path_breadcrumbs_ui/path_breadcrumbs_ui.admin.inc b/path_breadcrumbs_ui/path_breadcrumbs_ui.admin.inc
--- a/path_breadcrumbs_ui/path_breadcrumbs_ui.admin.inc
+++ b/path_breadcrumbs_ui/path_breadcrumbs_ui.admin.inc (date 1656599669399)
@@ -152,6 +152,34 @@
),
);
+ $form['path_breadcrumbs_theme']['path_breadcrumbs_list_element_tag'] = array(
+ '#type' => 'textfield',
+ '#title' => t('List Element HTML Tag'),
+ '#default_value' => variable_get('path_breadcrumbs_item_element_tag', 'ol'),
+ '#size' => 8,
+ '#description' => t('The HTML tag that should wrap the item list (excluding the angled brackets: <, >).'),
+ );
+
+ $form['path_breadcrumbs_theme']['path_breadcrumbs_item_element_tag'] = array(
+ '#type' => 'textfield',
+ '#title' => t('List Item Element HTML Tag'),
+ '#default_value' => variable_get('path_breadcrumbs_item_element_tag', 'li'),
+ '#size' => 8,
+ '#description' => t('The HTML tag that should wrap each list element (excluding the angled brackets: <, >).'),
+ );
+
+ $form['path_breadcrumbs_theme']['path_breadcrumbs_render_delimiter'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Render Delimiter'),
+ '#default_value' => variable_get('path_breadcrumbs_render_delimiter', FALSE),
+ '#description' => t('Whether the delimiter should be rendered in the HTML output.'),
+ '#states' => array(
+ 'disabled' => array(
+ ':input[name="path_breadcrumbs_internal_render"]' => array('checked' => FALSE),
+ ),
+ ),
+ );
+
$form['path_breadcrumbs_theme']['path_breadcrumbs_delimiter'] = array(
'#type' => 'textfield',
'#title' => t('Delimiter'),
@@ -160,7 +188,9 @@
'#description' => t('Symbol that separates breadcrumbs. HTML is not allowed. You can use .delimiter
class name to style the delimiter in CSS.'),
'#states' => array(
'disabled' => array(
- ':input[name="path_breadcrumbs_internal_render"]' => array('checked' => FALSE),
+ array(':input[name="path_breadcrumbs_internal_render"]' => array('checked' => FALSE)),
+ 'or',
+ array(':input[name="path_breadcrumbs_render_delimiter"]' => array('checked' => FALSE)),
),
),
);
Index: path_breadcrumbs.module
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/path_breadcrumbs.module b/path_breadcrumbs.module
--- a/path_breadcrumbs.module
+++ b/path_breadcrumbs.module (date 1656599543857)
@@ -339,7 +339,7 @@
}
// Add options for rich snippets.
- $elem_tag = 'span';
+ $elem_tag = variable_get('path_breadcrumbs_item_element_tag', 'li');
$elem_property = '';
$root_property = '';
$options = array('html' => TRUE);
@@ -347,22 +347,27 @@
if ($snippet == PATH_BREADCRUMBS_RICH_SNIPPETS_RDFA) {
// Add link options for RDFa support.
- $options['attributes'] = array('rel' => 'v:url', 'property' => 'v:title');
+ $options['attributes'] = [
+ 'property' => 'ListItem',
+ 'typeof' => 'WebPage',
+ ];
$options['absolute'] = TRUE;
// Set correct properties for RDFa support.
- $elem_property = ' typeof="v:Breadcrumb"';
- $root_property = ' xmlns:v="http://rdf.data-vocabulary.org/#"';
+ $elem_property = ' property="itemListElement" typeof="ListItem"';
+ $root_property = ' vocab="http://schema.org/" typeof="BreadcrumbList"';
}
elseif ($snippet == PATH_BREADCRUMBS_RICH_SNIPPETS_MICRODATA) {
// Add link options for microdata support.
- $options['attributes'] = array('itemprop' => 'url');
+ $options['attributes'] = array('itemprop' => 'item');
$options['absolute'] = TRUE;
// Set correct properties for microdata support.
- $elem_property = ' itemscope itemtype="http://data-vocabulary.org/Breadcrumb"';
- $elem_tag = 'div';
+ $elem_property = ' itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"';
+ $elem_tag = variable_get('path_breadcrumbs_item_element_tag', 'li');
+
+ $root_property = ' itemscope itemtype="http://schema.org/BreadcrumbList"';
// Add style that will display breadcrumbs wrapped in