🖋Takahisa
8/12/2022
How Blogs Work, part3
This is the third in a series of articles that takes a peek behind the scenes of the blog page. In Part 3, we will introduce how the code for the articles output in Part 2 is processed and assigned.
#1 Latest Posts
As you know, this blog page shows the latest posts at the "top page" of the page. How does this work?
▲Latest Posts
First, the date each blog was written is retrieved from the "Date" field under "Post Settings" at the top of the page.
▲Where to enter the date
Then, by comparing the size of the date, the code of each article is assigned a number, starting with the most recent. Then, by extracting the articles in that order, the latest postings can be retrieved.
▲Here is where the sorting process is done
For ease of processing, the left side also provides data for converting column numbers (alphabetical) to row numbers (numeric).
#2 Recommended Post
As you know, this blog page displays recommended posts at the "top page" of the page. How does this work?
▲Recommended post
The basic mechanism for recommended posts is the same as for "latest posts. But how do we determine whether a post is recommended or not? The answer is simple. When writing a blog post, members secretly specify the recommendation level of the post on a scale of 1 to 10,000 in the "Post Settings" section at the top of the blog.
The system determines the "recommended posts" according to the size of the recommendation. We will probably write a post with a recommendation of 10,000 when we win this contest.
#3 Next post,Previous post
▲Next Post Previous Post
This mechanism is basically the same as the "Latest Posts." The title of the article above and below it is displayed.
#4 Tag search function
Each blog post is assigned a tag to provide a quick overview of the post. In addition, the contents list page allows users to search for articles by their tag items. This section explains how this works.
▲Contents List Page and Tags
First of all, tags can be selected from 9 items in the "Article Settings" section at the top of each article by using the pull-down menu. Selected tags are used as they are on the article, and are automatically processed to be used as source data for the tag search system.
▲Tag search screen
The tag search uses a checkbox function, and the presence or absence of the checkbox is linked to the value of the tag to switch the display and non-display of the article.
#5 Writer search function
In the contents list page, there is a function that allows you to display articles by writer. (This feature can coexist with tags!!!). ) The search function can be used in conjunction with tags.
▲Writer search screen
This mechanism is basically the same as the tag search function. If I may say so, this one uses radio buttons instead of checkboxes. In the same way, by linking the check/uncheck status of each radio button and the writer setting of each article, the display/non-display of articles is toggled.
That's all for today's article! Next time, we will finish up with the last part. How Blogs Work, Part 4. We will show you the final output of the code and how to paste it into an article. Enjoy!
Click here for How Blogs Work, Part 4Google Sheets is a trademark of Google LLC.
“Google and Google Sheets are trademarks of Google LLC and this website is not endorsed by or affiliated with Google in any way.”