Code Monkey home page Code Monkey logo

oc-blogtaxonomy-plugin's Introduction

Blog Taxonomy

Taxonomy extension for RainLab Blog plugin.

GitHub tag Maintainability Scrutinizer Code Quality

Table of Contents

Inspired by Blog Tags Extension and Blog Series plugins Blog Taxonomy adds both tags and series functionality in a high quality and reliable way. Every post could belong to a single series and at the same time it can have multiple tags assigned.

Categories are meant for broad grouping of your posts. Think of these as general topics or the table of contents for your site. Categories are there to help identify what your blog is really about. It is to assist readers finding the right type of content on your site. Categories are hierarchical, so you can define sub-categories. Tags are meant to describe specific details of your posts. Think of these as your site’s index words. They are the micro-data that you can use to micro-categorize your content. Tags are not hierarchical.

And series could help you to organize your posts in a single flow of related posts.

Changes to Original Blog Plugin

Original blog categories were enhanced with ability to add posts while being on the single category page. They were also placed in a new tag-like style along with tags and series in their own Taxonomy tab of a backend CMS blog page.

Implementing Frontend Pages

The Blog Taxonomy plugin provides several useful components with basic markup for frontend usage. The default markup is not intended to fit to any existing frontend theme, so if the default markup is not suitable for your website, feel free to copy it from the default partial and replace the markup with your own.

Available components:

  • Post Series Navigation (seriesNavigation) - provides navigation within the series for a single post.
  • Posts in the Series (postsInSeries) - lists all posts in the supplied series.
  • Posts With the Tag (postsWithTag) - lists all posts with the supplied tag.
  • Related Posts (relatedPosts) - provides a list of posts related by tags.
  • Series List (seriesList) - displays a list of series.
  • Tag List (tagList) - displays a list of tags.

Post Series Navigation

Component seriesNavigation provides navigation within the series for a single post. You can display, for example, next and previous posts in the same series, show series details and link to its page, etc.

Component properties:

  • Post slug - get series navigation for the post specified by slug value from URL parameter; e.g. if post slug is :post the page URL must contain :post parameter which value will be used as post slug to retrieve the series;
  • Series page - CMS page which contains postsInSeries component and is used to display a single series content and posts;
  • Post page - name of the blog post page to display a single blog post content.

Posts in the Series

Component postsInSeries lists all posts in the supplied series. The component supports pagination and posts ordering.

Available properties:

  • Series slug - look up the series using the supplied slug value from this URL parameter; e.g. if series slug is :series the page URL must contain :series parameter which value will be used as series slug to retrieve the series;
  • Post order - attribute and direction on which posts should be ordered;
  • Page parameter - calculate pagination based on this URL parameter;
  • Items per page - how many items (if any) should be displayed per page, "0" displays all items;
  • Post page - name of the blog post page to display a single blog post content;
  • Category page - name of the category page to display a single blog category content.

Posts With the Tag

Component postsWithTag lists all posts with the supplied tag. The component supports pagination and posts ordering.

Available properties:

  • Tag slug - look up the tag using the supplied slug value from this URL parameter; e.g. if tag slug is :tag the page URL must contain :tag parameter which value will be used as tag slug to retrieve the tag;
  • Post order - attribute and direction on which posts should be ordered;
  • Page parameter - calculate pagination based on this URL parameter;
  • Items per page - how many items (if any) should be displayed per page, "0" displays all items;
  • Post page - name of the blog post page to display a single blog post content;
  • Category page - name of the category page to display a single blog category content.

Related Posts

Component relatedPosts provides a list of posts related by tags, e.g. posts which have some tags in common.

Available properties:

  • Post slug - get related posts for the post specified by slug value from URL parameter; e.g. if post slug is :post the page URL must contain :post parameter which value will be used as post slug to retrieve the related posts;
  • Limit - number of posts to display, 0 retrieves all related posts;
  • Post order - attribute and direction on which posts should be ordered;
  • Post page - name of the blog post page to display a single blog post content.

Series List

Component seriesList displays a list of series.

Available properties:

  • Display empty series - whether to show series which don't have any posts assigned or not;
  • Limit - number of series to display, 0 retrieves all series;
  • Series order - how series list should be ordered;
  • Series page - CMS page which contains postsInSeries component and is used to display a single series content and posts.

Tag List

Component postTagList displays a list of tags. Can be used to build a tag cloud (because post count with each tag is available). It also can be used to retrieve a list of tags for specific post.

Please don't forget to use different aliases for components if you use the same component several times on the same page (presumably for different purpose)

Available properties:

  • Display empty tags - whether to show tags which were no assigned to any posts or not;
  • Limit - number of tags to display, 0 retrieves all tags;
  • Tag order - how tags should be ordered;
  • Post slug - get tags for the post specified by slug value from URL parameter; e.g. if post slug is :post the page URL must contain :post parameter which value will be used as post slug to retrieve the tags;

It is not required to set it to a real value unless you want to display tags specific for the post

  • Tag page - CMS page which contains postsWithTag component and is used to display a single tag content and posts;

To Do

  • complete localization for backend partials;
  • add translate capabilities;
  • add threshold parameter for related posts.

oc-blogtaxonomy-plugin's People

Contributors

ginopane avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.