You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/application/views/mobile_first/ah-structured-data-breadcru...

28 lines
824 B
PHP

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://www.chinahighlights.com/"
}
<?php foreach ($breadcrumb_data as $index => $item) {?>
,{
"@type": "ListItem",
"position": <?php echo ($index + 2) ?>,
"name": "<?php echo $item['ic_url_title'] ?>",
"item": "https://www.chinahighlights.com<?php echo $item['ic_url'] ?>"
}
<?php }?>
<?php if ($information->ic_url != '/') {?>
,{
"@type": "ListItem",
"position": <?php echo (count($breadcrumb_data) + 2) ?>,
"name": "<?php echo $information->ic_title ?>"
}
<?php }?>
]
}
</script>