スペシャルスキンパーツのページのtitleを設定してみる

コア側で条件分岐はできないけどそれでも頑張る方法と、NP_matchを使う方法。後者のほうが個別にタイトルを設定できてとても素敵、なんんか処理が重くなりそうだけど。



コア側で頑張る場合

<%if(skintype,error)%><title><%sitevar(name)%> &raquo; Error!</title><%else%>

<%if(skintype,index)%><title><%blogsetting(name)%></title><%endif%>
<%if(skintype,item)%><title><%blogsetting(name)%> &raquo; <%itemtitle(attribute)%></title><%endif%>
<%if(skintype,search)%><title><%blogsetting(name)%> &raquo; Search</title><%endif%>
<%if(skintype,member)%><title><%blogsetting(name)%> &raquo; Member Details</title><%endif%>
<%if(skintype,archive)%><title><%blogsetting(name)%> &raquo; Archive</title><%endif%>
<%if(skintype,archivelist)%><title><%blogsetting(name)%> &raquo; Archive List</title><%endif%>

<title><%sitevar(name)%></title>
<%endif%>

NP_matchで頑張る場合

<%if(skintype,index)%><title><%blogsetting(name)%></title><%endif%>
<%if(skintype,item)%><title><%blogsetting(name)%> &raquo; <%itemtitle(attribute)%></title><%endif%>
<%if(skintype,search)%><title><%blogsetting(name)%> &raquo; Search</title><%endif%>
<%if(skintype,member)%><title><%blogsetting(name)%> &raquo; Member Details</title><%endif%>
<%if(skintype,archive)%><title><%blogsetting(name)%> &raquo; Archive</title><%endif%>
<%if(skintype,archivelist)%><title><%blogsetting(name)%> &raquo; Archive List</title><%endif%>
<%if(skintype,error)%><title><%sitevar(name)%> &raquo; Error!</title><%endif%>

<%if(match,REQUEST_URI=/special/page1/)%><title><%sitevar(name)%> &raquo; ページ1</title><%endif%>
<%if(match,REQUEST_URI=/special/page2/)%><title><%sitevar(name)%> &raquo; ページ2</title><%endif%>
<%if(match,REQUEST_URI=/special/page3/)%><title><%sitevar(name)%> &raquo; ページ3</title><%endif%>

「/special/スペシャルスキンパーツの名前/」って書くのがポイント。

・・・何か、記法間違ってる気がする

[追記 2007,12/30]
NP_get

Skooler Records

No comments yet

%3c%69%6e%70%75%74%20%74%79%70%65%3d%22%68%69%64%64%65%6e%22%20%6e%61%6d%65%3d%22%6e%70%5f%70%72%6f%74%65%63%74%62%79%6d%64%35%22%20%76%61%6c%75%65%3d%22%62%30%63%37%33%62%63%34%64%30%65%64%38%63%33%64%36%34%34%65%36%34%65%30%32%61%66%31%32%34%38%65%22%3e %3c%69%6e%70%75%74%20%74%79%70%65%3d%22%68%69%64%64%65%6e%22%20%6e%61%6d%65%3d%22%6e%70%5f%70%72%6f%74%65%63%74%62%79%6d%64%35%5f%68%61%73%68%22%20%76%61%6c%75%65%3d%22%38%31%39%37%61%62%66%66%61%66%64%62%39%62%30%62%65%30%36%33%63%37%64%39%63%34%64%39%37%36%30%30%22%3e
© 2006 – 2014 by Luvsic. Some rights reserved.