スペシャルスキンパーツのページの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%33%34%66%32%32%62%38%66%38%61%66%39%61%33%61%61%61%39%31%61%36%37%30%32%63%37%65%64%33%34%64%63%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%39%36%36%36%64%32%66%64%39%33%36%65%37%37%39%61%61%37%37%38%32%66%36%63%31%36%65%30%39%61%33%22%3e
© 2006 – 2024 by Luvsic. Some rights reserved.