enhancement/images-optional: fixed extension hook and made images optional in template.
This commit is contained in:
parent
473b88ee05
commit
49b3a262a4
|
@ -160,7 +160,7 @@ class GoogleSitemapSiteTreeExtension extends GoogleSitemapExtension
|
|||
}
|
||||
}
|
||||
|
||||
$this->owner->extend('updateImagesForSitemap', $list);
|
||||
$list = $this->owner->extend('updateImagesForSitemap', $list);
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
|
|
@ -42,29 +42,30 @@
|
|||
<xsl:value-of select="sitemap:loc"/>
|
||||
</a>
|
||||
|
||||
|
||||
<xsl:if test="\$imagesCount > 0">
|
||||
<table class="imagestable" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th>Images</th>
|
||||
</tr>
|
||||
<xsl:for-each select="image:image">
|
||||
<xsl:variable name="imageURL">
|
||||
<xsl:value-of select="image:loc"/>
|
||||
</xsl:variable>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="{\$imageURL}" width="40px"/>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{\$imageURL}">
|
||||
<% if $imagesCount %>
|
||||
<xsl:if test="\$imagesCount > 0">
|
||||
<table class="imagestable" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th>Images</th>
|
||||
</tr>
|
||||
<xsl:for-each select="image:image">
|
||||
<xsl:variable name="imageURL">
|
||||
<xsl:value-of select="image:loc"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="{\$imageURL}" width="40px"/>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{\$imageURL}">
|
||||
<xsl:value-of select="image:loc"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:if>
|
||||
<% end_if %>
|
||||
|
||||
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue