[英]can esi:include src be used as an esi variable in html page
例:
通過akamai CDN呈現的html頁面中的esi:assign和esi:include問題
http://www.trial.com/abc/def/ghjiy (Akamai rendering src) has content "abc"
In an html page
<esi:include src="http://www.trial.com/abc/def/ghjiy"></esi:include> will return "abc"
can I assign this to a variable so we can use it multiple times in the html page using
<esi:vars>$(val)</esi:vars>
I have tried something like this
<esi:text><esi:assign name="val">'</esi:text><esi:include
src="http://www.trial.com/abc/def/ghjiy"></esi:include><esi:text>'</esi:assign></esi:text>"
But after html page being rendered the <esi:assign> tags has not been parsed and returned
the following in page source
<esi:assign name="val">abc</esi:assign>
您可以使用esi:eval
代替esi:include
。
此http://www.trial.com/abc/def/ghjiy可以返回esi代碼片段,該片段將在邊緣進行評估。 例如: <esi assign name="val">I assign this to a variable so we can use it multiple times in the html page using</esi:assign>
然后,您可以使用<esi:vars>$(val)</esi:vars>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.