xml Miva - mvt:做Sitemap

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml Miva - mvt:做Sitemap相关的知识,希望对你有一定的参考价值。

<mvt:assign name="l.header" value="miva_output_header( 'Content-Type', 'application/xml' )" />

<?xml version="1.0" encoding="UTF-8"?>
	<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
		<url>
			<loc>https://&mvt:global:domain:name;</loc>
			<priority>1.0</priority>
		</url>

<mvt:comment> -- Categories -- </mvt:comment>
<mvt:do name="l.settings:category_count" file="g.Module_Library_DB" value="Runtime_CategoryList_Load_All( l.settings:categories )" />
<mvt:foreach iterator="category" array="categories">

	<mvt:assign name="l.uri:store_id" value="g.Store:id" />
	<mvt:assign name="l.uri:screen" value="''" />
	<mvt:assign name="l.uri:page_id" value="0" />
	<mvt:assign name="l.uri:cat_id" value="l.settings:category:id" />
	<mvt:assign name="l.uri:product_id" value="0" />

	<mvt:do file="g.Module_Feature_URI_DB" name="l.have_uri" value="URI_Load_Item_Canonical( l.uri, l.settings:canonical_uri )" />
	<mvt:if expr="l.have_uri">
		<url>
			<loc>https://&mvt:global:domain:name;&mvt:canonical_uri:uri;</loc>
			<priority>0.8</priority>
		</url>
	</mvt:if>
</mvt:foreach>

<mvt:comment> -- Products -- </mvt:comment>
<mvt:do name="l.settings:product_count" file="g.Module_Library_DB" value="Runtime_ProductList_Load_All( l.settings:products )" />
<mvt:foreach iterator="product" array="products">

	<mvt:assign name="l.uri:store_id" value="g.Store:id" />
	<mvt:assign name="l.uri:screen" value="''" />
	<mvt:assign name="l.uri:page_id" value="0" />
	<mvt:assign name="l.uri:cat_id" value="0" />
	<mvt:assign name="l.uri:product_id" value="l.settings:product:id" />

	<mvt:do file="g.Module_Feature_URI_DB" name="l.have_uri" value="URI_Load_Item_Canonical( l.uri, l.settings:canonical_uri )" />
	<mvt:if expr="l.have_uri">
		<url>
			<loc>https://&mvt:global:domain:name;&mvt:canonical_uri:uri;</loc>
			<priority>0.7</priority>
		</url>
	</mvt:if>
</mvt:foreach>

<mvt:comment><!-- Pages --></mvt:comment>
<mvt:do file="g.module_feature_tui_db" name="l.result" value="PageList_Load_All_Runtime( l.settings:pages )" />
<mvt:foreach iterator="page" array="pages">

	<mvt:assign name="l.uri:store_id" value="g.Store:id" />
	<mvt:assign name="l.uri:screen" value="''" />
	<mvt:assign name="l.uri:page_id" value="l.settings:page:id" />
	<mvt:assign name="l.uri:cat_id" value="0" />
	<mvt:assign name="l.uri:product_id" value="0" />

	<mvt:do file="g.Module_Feature_URI_DB" name="l.have_uri" value="URI_Load_Item_Canonical( l.uri, l.settings:canonical_uri )" />
	<mvt:if expr="l.have_uri">
		<url>
			<loc>https://&mvt:global:domain:name;&mvt:canonical_uri:uri;</loc>
			<priority>0.7</priority>
		</url>
	</mvt:if>
</mvt:foreach>

</urlset>

以上是关于xml Miva - mvt:做Sitemap的主要内容,如果未能解决你的问题,请参考以下文章

xml Miva - mvt:做BasektCharge_Insert

xml Miva - mvt:做Basket_Reset_Contents

xml Miva - mvt:做Basket_Reset_Contents

xml Miva - mvt:做模块加载ID和模块加载代码

xml Miva - mvt:debug

xml Miva - mvt:调用基本授权标题