xml 延迟加载滑块,带有URL类型检查

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml 延迟加载滑块,带有URL类型检查相关的知识,希望对你有一定的参考价值。

<div class="wrap sfnt-hero">
    <div class="column whole">
        <div class="row sfnt-hero">
            <div id="sfnt-slider">
                <mvt:item name="readytheme" param="image( 'slider1' )" />

                <!-- 2 -->
                <mvt:item name="readytheme" param="load_image('slider2', l.settings:loaded_image2)" />
                <mvt:if expr="l.settings:readytheme:loaded_image2:active">
                    <mvt:do file="g.Module_Library_DB" name="l.settings:readytheme:image_loaded2" value="Image_Load_ID( l.settings:readytheme:loaded_image2:image_id, l.settings:readytheme:loaded_image2_source )" />
                    <mvt:if expr="l.settings:readytheme:image_loaded2">
                        <mvt:if expr="l.settings:readytheme:loaded_image2:link_type EQ 'P'">
                            <a href="/product/&mvt:readytheme:loaded_image2:link_dest;.html" target="&mvt:readytheme:loaded_image2:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image2_source:image;" alt="&mvt:readytheme:loaded_image2:image_alt;"/>
                            </a>
                        <mvt:elseif expr="l.settings:readytheme:loaded_image2:link_type EQ 'C'">
                            <a href="/category/&mvt:readytheme:loaded_image2:link_dest.html;" target="&mvt:readytheme:loaded_image2:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image2_source:image;" alt="&mvt:readytheme:loaded_image2:image_alt;"/>
                            </a>
                        <mvt:elseif expr="l.settings:readytheme:loaded_image2:link_type EQ 'G'">
                            <a href="/&mvt:readytheme:loaded_image2:link_dest.html;" target="&mvt:readytheme:loaded_image2:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image2_source:image;" alt="&mvt:readytheme:loaded_image2:image_alt;"/>
                            </a>
                        <mvt:else>
                            <a href="&mvt:readytheme:loaded_image2:link_dest;" target="&mvt:readytheme:loaded_image2:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image2_source:image;" alt="&mvt:readytheme:loaded_image2:image_alt;"/>
                            </a>
                        </mvt:if>
                    </mvt:if>
                </mvt:if>

                <!-- 3 -->
                <mvt:item name="readytheme" param="load_image('slider3', l.settings:loaded_image3)" />
                <mvt:if expr="l.settings:readytheme:loaded_image3:active">
                    <mvt:do file="g.Module_Library_DB" name="l.settings:readytheme:image_loaded3" value="Image_Load_ID( l.settings:readytheme:loaded_image3:image_id, l.settings:readytheme:loaded_image3_source )" />
                    <mvt:if expr="l.settings:readytheme:image_loaded3">
                        <mvt:if expr="l.settings:readytheme:loaded_image3:link_type EQ 'P'">
                            <a href="/product/&mvt:readytheme:loaded_image3:link_dest;.html" target="&mvt:readytheme:loaded_image3:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image3_source:image;" alt="&mvt:readytheme:loaded_image3:image_alt;"/>
                            </a>
                        <mvt:elseif expr="l.settings:readytheme:loaded_image3:link_type EQ 'C'">
                            <a href="/category/&mvt:readytheme:loaded_image3:link_dest;.html" target="&mvt:readytheme:loaded_image3:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image3_source:image;" alt="&mvt:readytheme:loaded_image3:image_alt;"/>
                            </a>
                        <mvt:elseif expr="l.settings:readytheme:loaded_image3:link_type EQ 'G'">
                            <a href="/&mvt:readytheme:loaded_image3:link_dest;.html" target="&mvt:readytheme:loaded_image3:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image3_source:image;" alt="&mvt:readytheme:loaded_image3:image_alt;"/>
                            </a>
                        <mvt:else>
                            <a href="&mvt:readytheme:loaded_image3:link_dest;" target="&mvt:readytheme:loaded_image3:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image3_source:image;" alt="&mvt:readytheme:loaded_image3:image_alt;"/>
                            </a>
                        </mvt:if>
                    </mvt:if>
                </mvt:if>

                <!-- 4 -->
                <mvt:item name="readytheme" param="load_image('slider4', l.settings:loaded_image4)" />
                <mvt:if expr="l.settings:readytheme:loaded_image4:active">
                    <mvt:do file="g.Module_Library_DB" name="l.settings:readytheme:image_loaded4" value="Image_Load_ID( l.settings:readytheme:loaded_image4:image_id, l.settings:readytheme:loaded_image4_source )" />
                    <mvt:if expr="l.settings:readytheme:image_loaded4">
                        <mvt:if expr="l.settings:readytheme:loaded_image4:link_type EQ 'P'">
                            <a href="/product/&mvt:readytheme:loaded_image4:link_dest;.html" target="&mvt:readytheme:loaded_image4:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image4_source:image;" alt="&mvt:readytheme:loaded_image4:image_alt;"/>
                            </a>
                        <mvt:elseif expr="l.settings:readytheme:loaded_image4:link_type EQ 'C'">
                            <a href="/category/&mvt:readytheme:loaded_image4:link_dest;.html" target="&mvt:readytheme:loaded_image4:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image4_source:image;" alt="&mvt:readytheme:loaded_image4:image_alt;"/>
                            </a>
                        <mvt:elseif expr="l.settings:readytheme:loaded_image4:link_type EQ 'G'">
                            <a href="/&mvt:readytheme:loaded_image4:link_dest;.html" target="&mvt:readytheme:loaded_image4:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image4_source:image;" alt="&mvt:readytheme:loaded_image4:image_alt;"/>
                            </a>
                        <mvt:else>
                            <a href="&mvt:readytheme:loaded_image4:link_dest;" target="&mvt:readytheme:loaded_image4:link_targ;">
                                <img data-lazy="&mvt:readytheme:loaded_image4_source:image;" alt="&mvt:readytheme:loaded_image4:image_alt;"/>
                            </a>
                        </mvt:if>
                    </mvt:if>
                </mvt:if>

            </div>
            <div class="breaker clear"></div>
        </div>
    </div>
</div>
<!-- end sfnt-hero -->  
<mvt:item name="readytheme" param="image( 'slider_1' )" />
<!-- Slider 2 -->
<mvt:item name="readytheme" param="load_image('slider_2', l.settings:loaded_slider2)" />
<mvt:if expr="l.settings:readytheme:loaded_slider2:active">
<mvt:do file="g.Module_Library_DB" name="l.settings:readytheme:image_slider2" value="Image_Load_ID( l.settings:readytheme:loaded_slider2:image_id, l.settings:readytheme:loaded_slider2_source )" />
	<mvt:if expr="l.settings:readytheme:loaded_slider2:link_type">
		<mvt:assign name="l.loaded_slider2link:store_id" value="g.Store:id" />
		<mvt:assign name="l.loaded_slider2link:screen" value="''" />
		<mvt:assign name="l.loaded_slider2link:page_id" value="0" />
		<mvt:assign name="l.loaded_slider2link:cat_id" value="0" />
		<mvt:assign name="l.loaded_slider2link:product_id" value="0" />
		<mvt:if expr="l.settings:readytheme:loaded_slider2:link_type EQ 'P'">
			<mvt:do name="l.settings:readytheme:loadprod" file="g.Module_Library_DB" value=" Product_Load_Code(l.settings:readytheme:loaded_slider2:link_dest, l.settings:readytheme:product) " />
			<mvt:assign name="l.loaded_slider2link:product_id" value="l.settings:readytheme:product:id" />
			<mvt:do file="g.Module_Feature_URI_DB" name="l.have_uri" value="URI_Load_Item_Canonical( l.loaded_slider2link, l.settings:canonical_uri )" />
			<a href="&mvt:canonical_uri:uri;" target="&mvt:readytheme:loaded_slider2:link_targ;">
				<img data-lazy="&mvt:readytheme:loaded_slider2_source:image;" alt="&mvt:readytheme:loaded_slider2:image_alt;"/>
			</a>
		<mvt:elseif expr="l.settings:readytheme:loaded_slider2:link_type EQ 'C'">
			<mvt:do name="l.settings:readytheme:loadcat" file="g.Module_Library_DB" value=" Category_Load_Code(l.settings:readytheme:loaded_slider2:link_dest, l.settings:readytheme:category) " />
			<mvt:assign name="l.loaded_slider2link:cat_id" value="l.settings:readytheme:category:id" />
			<mvt:do file="g.Module_Feature_URI_DB" name="l.have_uri" value="URI_Load_Item_Canonical( l.loaded_slider2link, l.settings:canonical_uri )" />
			<a href="&mvt:canonical_uri:uri;" target="&mvt:readytheme:loaded_slider2:link_targ;">
				<img data-lazy="&mvt:readytheme:loaded_slider2_source:image;" alt="&mvt:readytheme:loaded_slider2:image_alt;"/>
			</a>
		<mvt:elseif expr="l.settings:readytheme:loaded_slider2:link_type EQ 'G'">
			<mvt:do name="l.settings:readytheme:loadprod" file="g.Module_Feature_TUI_DB" value=" Page_Load_Code(l.settings:readytheme:loaded_slider2:link_dest, l.settings:readytheme:page) " />
			<mvt:assign name="l.loaded_slider2link:page_id" value="l.settings:readytheme:page:id" />
			<mvt:do file="g.Module_Feature_URI_DB" name="l.have_uri" value="URI_Load_Item_Canonical( l.loaded_slider2link, l.settings:canonical_uri )" />
			<a href="&mvt:canonical_uri:uri;" target="&mvt:readytheme:loaded_slider2:link_targ;">
				<img data-lazy="&mvt:readytheme:loaded_slider2_source:image;" alt="&mvt:readytheme:loaded_slider2:image_alt;"/>
			</a>
		<mvt:elseif expr="l.settings:readytheme:loaded_slider2:link_type EQ 'U'">
			<a href="&mvt:readytheme:loaded_slider2:link_dest;" target="&mvt:readytheme:loaded_slider2:link_targ;">
				<img data-lazy="&mvt:readytheme:loaded_slider2_source:image;" alt="&mvt:readytheme:loaded_slider2:image_alt;"/>
			</a>
		<mvt:else>
			<img data-lazy="&mvt:readytheme:loaded_slider2_source:image;" alt="&mvt:readytheme:loaded_slider2:image_alt;"/>
		</mvt:if>
	</mvt:if>
</mvt:if>
<!-- /Slider 2 -->

以上是关于xml 延迟加载滑块,带有URL类型检查的主要内容,如果未能解决你的问题,请参考以下文章

xml 延迟加载带有while循环的sfnt滑块

xml 延迟加载带有while循环的sfnt滑块

xml 加载Readytheme图像数组以添加到延迟加载滑块//用于Guy Harvey Jewelry。

xml 加载Readytheme图像数组以添加到延迟加载滑块//用于Guy Harvey Jewelry。

使用 URL 查询字符串加载页面时 jQuery 设置 UI 滑块

带有语义标记的延迟图像加载