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