Skip to content

Instantly share code, notes, and snippets.

@cmb69

cmb69/.diff Secret

Last active September 25, 2019 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmb69/786ece8c527bfe160ad158bf43427898 to your computer and use it in GitHub Desktop.
Save cmb69/786ece8c527bfe160ad158bf43427898 to your computer and use it in GitHub Desktop.
locator patch
cmsimple/tplfuncs.php | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/cmsimple/tplfuncs.php b/cmsimple/tplfuncs.php
index 4a91580e..3250e1bc 100644
--- a/cmsimple/tplfuncs.php
+++ b/cmsimple/tplfuncs.php
@@ -369,14 +369,15 @@ function locator()
}
$html .= '<span property="itemListElement" typeof="ListItem">';
$inner = '<span property="name">' . $title
- . '</span><meta property="position" content="'. ($i + 1) . '">';
+ . '</span>';
if (isset($url) && $i < $last) {
$html .= '<a property="item" typeof="WebPage" href="' . $url . '">'
. $inner . '</a>';
} else {
- $html .= $inner;
+ $html .= '<span property="item" typeof="WebPage" href="' . $url . '">'
+ . $inner . '</span>';
}
- $html .= '</span>';
+ $html .= '<meta property="position" content="'. ($i + 1) . '"></span>';
}
$html .= '</span>';
return $html;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment