Skip to content

blog_category.rb

TADA Tadashi edited this page Dec 22, 2017 · 1 revision

How to use

This is a making category plugin of tDiary BlogKit.

In tDiary with BlogKit, you can specify the category of the article in the title, in the form of:

[category] the title of the article

In the generated HTML, '[category]' is a link to the view of the category. You can specify as many categories as you want.

If you want to show the information of categories in the sidebar, add the followings to

Appendix

<div class="sidemenu">Category:</div>
<%=blog_category_form%>
<%=blog_category_entry%>

blog_category_form

shows a dropdown list to select a category to be shown.

blog_category_entry

shows the list of titles which can't be shown in the category view.

You can get all of categories and titles with 'blog_category_cache_restore' method, and use this information in your own plugins.

Clone this wiki locally