« KakuからMovable Typeに投稿 | ホーム | Macのアプリケーションアイコンを他のアプリにコピーする »

2008年4月25日

カテゴリA以下のページで、Aのサブカテゴリのリストを並列に表示する

カテゴリA以下のページで、Aのサブカテゴリのリストを並列に表示する
  • カテゴリA以下のページでは常に表示する
  • 公開済みの記事があるサブカテゴリのみ表示する
  • 公開済みの記事が一件も無い場合は完全に非表示になる

悩ましいのは最後のリストにclass="lastChild"とか付けたいんだけど出来ないこと。

<MTTopLevelParent>
    <MTSubCategories include_current="1">
        <MTSetVarBlock name="tmpCategoryCount"><MTSubCategories><$MTCategoryCount$><$MTSubCatsRecurse$></MTSubCategories></MTSetVarBlock>
        <MTIf name="tmpCategoryCount" gt="0">
            <MTSubCatIsFirst><div>
                <h3><$MTCategoryLabel$>のサブカテゴリ</h3>
                <ul></MTSubCatIsFirst>
                    <MTSubCategories>
                        <MTIfNonZero tag="MTCategoryCount">
                            <li><a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a></li>
                        </MTIfNonZero>
                        <$MTSubCatsRecurse$>
                    </MTSubCategories>
                <MTSubCatIsLast></ul>
            </div></MTSubCatIsLast>
        </MTIf>
    </MTSubCategories>
</MTTopLevelParent>

MTSubCategories では記事が一件もないカテゴリでも出力してしまう。単純に<MTIfNonZero tag="MTCategoryCount">だけ使うとヘッダとフッタ部分を非表示にできないので、

<MTSetVarBlock name="tmpCategoryCount"><MTSubCategories><$MTCategoryCount$><$MTSubCatsRecurse$></MTSubCategories></MTSetVarBlock>

でサブカテゴリの記事件数を出力。
カテゴリ分くりかえすので 0120112 とか辺な数字になるけど気にしない。

<MTIf name="tmpCategoryCount" gt="0">

として、0より大きかったら実行する。

トラックバック(0)

トラックバックURL: http://retlet.net/cgi-bin/mt5/mt-tb.cgi/19

コメント(103)

very nice post, i undoubtedly genuinely like this outstanding website, carry on it

Wow, that’s what I was searching for, what a information! existing here at this blog, thanks admin of this website.

Hello! I just would like to give a huge thumbs up for the wonderful information you've got here on this post. I is going to be coming back to your blog for a lot more soon.

When I came over to this article I can only see part of it, is this my net browser or the internet website? Should I reboot?

Hurrah! In the end I got a website from where I be capable of really get useful facts concerning my study and knowledge.

Echt tolle Seite. Rubbish bin eigentlich nur per Zufall hier gelandet, aber ich bin jetzt schon complete von der tremendous Seite beeindruckt. Gratuliere dazu!! Viel Erfolg noch durch der sehr guten Home-page mein Freund.

Fantastic goods from you, man. I’ve realize your stuff previous to and you are just incredibly excellent. I truly like what you might have acquired here, truly like what you are stating and the way in which you say it. You make it entertaining and you still take care of to keep it sensible. I cant wait to read much more from you. This is genuinely a fantastic site. xrumer

Typically the New york Weight Loss diet is certainly less expensive and flexible staying on your diet scheme intended for measures however quick then duty keep a nutritious every day life. weight loss

What a lovely story! The story in this YouTube video that is posted at this time is truly a good one with having pleasant picture quality.

I am always looking online for ideas that can help me. Thx!

Hello there, You have performed a fantastic job. I will definitely digg it and in my view recommend to my friends. I am sure they will be benefited from this site.

This really is such a awesome write-up. I’ve been searching for this data for quite a although now and then lastly stumbled upon your internet site. Thanks so much for posting this, this has helped me out tremendously. By the way I adore the style with the blog, looks excellent, did you create it all by yourself?

Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You definitely know what youre talking about, why waste your intelligence on just posting videos to your site when you could be giving us something informative to read?

I was reading through some of your content material on this internet website and I believe this site is actually instructive! Keep putting up.

I often read your blog, if you can, do post new stuff more often :D

Housing a different movement in a genuine case or re-dialed model.

Have read a couple of of the articles on your website now, and I genuinely like your style of blogging. I added it to my favorites weblog web site list and will probably be checking back soon.

What i don't realize is actually how you're not really much more well-liked than you might be now. You're very intelligent. You realize therefore considerably relating to this subject, produced me personally consider it from numerous varied angles. Its like women and men aren't fascinated unless it is one thing to do with Lady gaga! Your own stuffs great. Always maintain it up!

I always read your blog, if you can, try publish new stuff more frequently :D

After study a number of of the blog posts in your web site now, and I really like your method of blogging. I bookmarked it to my bookmark web site record and shall be checking again soon. Pls try my web page as well and let me know what you think.

Many thanks for an incredible put up, would examine your particular others posts. many thanks for your ideas within this, I experienced a trifle struck by this short article. Thanks again again! You wanna make a great time. Portrays natures best by the great info here. I do think if a greater number of people considered it doing this, they'd have a very better time period get the hang ofing the difficulty.

Spot on with this write-up, I truly think this website needs much more consideration. I’ll probably be again to read much more, thanks for that info.

I think this is one of the most vital info for me. And i am glad reading your article. But wanna remark on some general things, The web site style is great, the articles is really excellent : D. Good job, cheers

Amazing layout I think.

Awesome! Its actually remarkable article, I have got much clear idea regarding from this post.

Hello there, You have performed an excellent job. I’ll definitely digg it and individually recommend to my friends. I am confident they will be benefited from this website.

Many thanks for an incredible submit, would examine your particular others content. thank you your thinking for this, I experienced a trifle struck by this article. Thanks again! You wanna make a good aspect. Displays the beauty through excellent info here. I do think if a greater number of people thought of it like this, they'd have got a better moment in time get the grasp ofing the difficulty.

I just couldn't depart your website prior to suggesting that I really enjoyed the usual information an individual supply on your visitors? Is going to be back ceaselessly in order to check out new posts

#up: Don't sure if you are right man.

Regards for this marvellous post, I am glad I detected this internet internet site on yahoo.

Hiya, I’m truly glad I've located this information. Nowadays bloggers publish only about gossip and net stuff and this is in fact frustrating. A excellent website with intriguing content, this is what I need to have. Thank you for generating this internet site, and I is going to be visiting again. Do you do newsletters? I Can’t uncover it.

This is a appropriate weblog for everybody who is wishes to discover out about this topic. You understand a fantastic deal its practically challenging to argue with you (not that I just would want…HaHa). You certainly put a brand new spin on a subject thats been discussed for years. Wonderful stuff, just amazing!

Thanks for an incredible submit, can study your others content. thanks for your thinking within this, I experienced a bit strike by this text. Thanks again again! You make an excellent time. Portrays natures best by the fantastic data here. I think if a greater number thought of it like that, they'd have a very better time period have the suspend ofing the matter.

Some truly amazing content material on this web website , appreciate it for contribution.

Perfect layout! How did you get that design?

Many thanks for an unbelievable submit, would study your personal others topics. thank you your thinking within this, I soon became a bit strike by this post. Thanks again! You wanna make a good point. Portrays natures best by the wonderful facts here. I do think that in case more individuals consideration for it like this, they'd have a better moment in time obtain the hold ofing the issue.

hello great site i will definaely come back and see once more.

Some actually marvelous work on behalf with the owner of this web internet site , dead excellent topic matter.

Some truly intriguing points you've written. Assisted me a whole lot, just what I was looking for : D.

Excellent post , I'm going to spend a lot more time researching this topic

Aw, it was quite a good post. In notion I have to put in writing such as this moreover - taking time and actual effort to produce a exceptional article… but what / issues I say… I procrastinate alot through no indicates manage to get something completed.

Very nice post, I certainly love this website, keep on it.

Beatiful site! How did you get that awesome layout?

Beatiful blog! How had you get that awesome design?

Regards for this post, I'm a big fan of this web site would like to go along updated.

I likewise believe thus, perfectly pent post! .

I visited plenty of internet site but I conceive this one holds something unique in it in it

Thank you for yet another informative internet site. The location else could I get that type of information written in such an perfect manner? I've a mission that I'm basically now working on, and I have been on the appear out for such data.

you have got a fantastic blog correct here! would you like to make some invite posts on my weblog?

The following the five information you must do remember so you can manage to produce your specific successful world-wide-web. survey reviews