2015-08-28 62 views
0

示例:ESI可以ESI:包括SRC用作html頁面的ESI可變

問題:分配和ESI:包括在通過Akamai的呈現的HTML頁面CDN

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> 
+0

我不知道的是,網絡性能鄉親參觀在這裏 - 你可以去到Akamai社區在http://community.akamai.com並訪問網絡性能部分?你應該在那裏得到及時的迴應。 –

回答

1

可以使用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>