Internet Windows Android

Creation of a blog on joomla. Creating a blog on Joomla! Using additional extensions

This component is a combination of all the functions available in standard blogs, plus a small introduction of the social component. CjBlog will give the opportunity to organize profiles for users on the site, give them the ability to rate the content, as well as conduct surveys and much more, but first things first. This component of the blog for Joomla 3 allows you to fully organize the work of the blog, while using extensive functionality, almost one of the best today. It should be noted that Last update development took place quite recently, so everyone will receive the most relevant set of functions, and even completely free of charge. This component has enough interesting possibilities, which means that it is worth considering them in any case.

CjBlog functionality

I will introduce the fact that for sites related to blogging, the most important thing is to maintain an easy-to-use interface, the developers have provided for many different little things. Nevertheless, we will consider the most important functions that look like this:

If you need a tool that will allow you to create not only a functional, but also really easy-to-use blog, then this option is perfect. Make a high-quality blog on joomla, where each user can maintain their own pages, as well as collaborate with social media- all of this is real if you choose the right extension.

A modern blog for everyone

Hello dear readers of the blog site. Today we will continue, which we have already raised several times earlier, and also learned. Today we will try to consider various options for displaying articles on site pages using various menu items.

The menu is one of the fundamental parts and usually acts as navigation elements. But in addition to navigation, they determine what exactly will be displayed on a dynamic page after clicking on a link to it. In fact, they determine what will be displayed on a particular page.

What is it for and how to work with Joomla menu items

This is not easy to understand, especially for those users who have dealt with static sites, in which the role of the menu was limited to providing navigation. In general, the issue of organizing content and methods of displaying content is one of the most difficult for novice jumblers.

At first, it is very difficult to grasp the entire relationship between the menu, its items, the content of the web pages and the modules in which they are displayed. But let's talk about everything in order. Firstly, they, as in any other website, can be located both horizontally (most often in the upper part of the window, but it is also possible to create the lower one), and vertically (either in the left or in the right column of the template).

Interestingly, the navigation menu item in Joomla can lead to a page with a single article, or to a blog or a list of materials contained in any category or section. Moreover, the same publication can be accessed by different links from the menu.

Some link will open it all alone on a web page, and some will display it as a list or as a blog of the category or section to which it belongs. You may not yet fully understand what this is about, but I hope that this understanding will come when you finish reading this guide.

So, you can see all this wealth in one place - in the menu manager. It will be possible to get into it from the admin panel by selecting from it top line"All menus" - "Menu". For each of them, you can create items that will form web pages with one or another.

Their appearance is set from the settings of these same menu items. This is very important to understand, because knowing where to look for certain settings, you will greatly facilitate your task. , as well as configuring modules for them.

Having entered the menu manager, you can click on the icon in the column opposite the one you need, as a result of which a list of all the items that are already in it will open. Access to this page can also be obtained by simply selecting in the admin panel from its top line "All menus" - "The name of the one you need":

As a result, a window with a list will open:

Creating a menu item

At the top of it you will see buttons, among them there will be a "Create" button, by clicking on which the wizard for creating a new navigation element will open:

In this window, you will see a tree structure of the types of menu links that you can create in Joomla. This tree contains nested elements that will open after clicking on the selected parent branch. Everything is pretty simple and intuitive.

It serves so that we can choose a presentation option for the page to which the transition will be made after clicking on the created menu link. In other words, you will have to select one of the Joomla page templates. Different templates allow you to combine one or more articles based on the sections and categories to which they belong.

Please note that there are quite a few options in the above tree of options and they are broken down by the types of components (this), on the basis of which the content will be displayed on the site. We are primarily interested in the options that offer to create a Content component built into the engine by default, which is responsible for working with materials.

But besides the main component for working with articles, there are others, which, in turn, will also add their own options to this tree, allowing you to link to web pages with content generated by our Content.

But for now we will dwell on the consideration of the withdrawal of materials, and everything else will be considered to the best of our ability. So, a menu item in Joomla can refer to three main types of pages: with a single article, an entire category, or a section.

In addition, a menu item can indicate both an individual component and a category of this component. For example, for you can create a link leading both to a page with a list of all categories of the gallery you have created, and to a page with content (photos) of a single one.

This disgrace can look like this:

At the same time, the following options were selected in the tree from those that were added after installing the Phoca Gallery component:

The main task when creating a site in Joomla is to properly organize the content (content, content). I mean the structure of sections and categories, both for articles and, for example, for the photo gallery component. Well, there are a lot of methods for displaying well-structured content.

True, it is often the variety of withdrawal methods that causes difficulties for novice users. But, I hope that by the end of reading this publication, you will slightly reduce the confusion introduced by the confusing system, and there will be clarity on at least some issues.

If you want to achieve the most convenient navigation, then you should start with the correct formation of sections and categories and the distribution of existing articles between them. And to form already on this basis a branched system of menus and their elements for a convenient and understandable output for users will already be a matter of technology.

Menu items that allow you to display articles on the site

To display content that includes articles on the site, you will need to add new items to the menu from the “Materials” branch of the tree. Quite logical, I suppose. By clicking on this branch of the tree, you will see a list of all possible options that you can use to display materials on the web pages of your site:

There are not so many of them, but they will allow you to display article content in a wide variety of forms - from individual publications to a blog of an entire section on one page of the website.

Now we just need to understand what this or that option is for in this branch of the tree, and then figure out their settings, which allow you to display blogs or lists of articles in Joomla. With these settings, you can set the appearance and display order of materials. But first things first.

We will consider the option of displaying a single article at the end of the publication, and there is nothing complicated and requiring attention there. And now I want to dwell on two main output patterns:

  1. Blog template (category or section) - so called because the way articles are displayed in this case resembles standard blogs. In this case, the web page generated in Joomla, in general, will be a series of announcements (introductory parts) of articles, which will end with the link "More". They will all belong to either one section or one category that you choose when setting up.
  2. A standard template for a section or a category list, which is essentially the same thing. The web page formed in Joomla will be a table in which either the headings of the categories from a specific section, or the headings of articles from a specific category will be listed.

Of course, the blog template has much more flexibility than the standard one, which displays page content in a table only in the form of headings that are links to full versions articles.

The format of a blog category or section allows you to display not only the titles of articles, but also add a small announcement, which allows you to arouse additional interest among visitors to this page to continue reading and follow the link "More".

At the same time, you can quite flexibly customize the appearance of displaying articles. It will be possible to set how many announcements will be displayed in the full width of the page, how many will be divided into columns, set the number of columns and determine the number of materials displayed at the bottom as links.

How to create a blog in Joomla based on category articles

Let's first try to create a menu item in Joomla based on a category (or section) blog template and look at all the settings that we can change. They will be almost identical for them. Therefore, we will consider only the option based on the category template, and you can figure out the section yourself by analogy.

So, go to the Joomla admin panel, select their top line items "All menus" - "The name you need." On the page that opens, click the "Create" button located at the top. In the tree that opens, click on the option "Materials" - "Category" - "List template". As a result of these actions, a window will open with the settings of the menu item based on the template you selected:

In the "Title" field, as usual, enter the name for this menu item that will be displayed on the site. The "Alias" field should only be filled in if. Then you will need to.

If you use third-party components for organizing SEF, you will not need to fill it out. I already wrote.

The Link field displays a hyperlink to the page generated from this menu item. You can copy it and use it to provide web links from the text of other articles on your site. In the "Show in" field, you will have to select a menu in which the item we are creating will be located.

In the column " Parent element"You can choose a parent for the created element, when you click on which, our nested item will be displayed in the menu. If you do not want to nest it, then you should leave the default option "Top".

In the "Access" area, you can specify which of the visitors will see this item. Either everyone (used most often), or only registered, or only Joomla administrators (option "Special").

In the "Open in" field, choose whether the page will be opened in the same window, or in a new window, or in a new browser tab.

Setting up a blog on Joomla

We go to the right side of the settings, where the tabs with the parameters responsible for the presentation of the web page, which will be opened as a result of clicking on this link, are concentrated. Let's start with the main parameters located on the tab of the same name:

In the "Category" field, you must select the one whose content will be displayed in the form of a blog. In the "Description" column, you can hide or show the display of the description for this category, which will be displayed at the top of the blog page. The same goes for the "Description picture".

In the "Full width" field, you can specify the number of articles (most often only their introductory parts - announcements), which will be displayed in the full width of the web page, without splitting into columns. In the "Introduction" column, you specify the number of materials that will be divided into columns, and in the "Columns" field, specify their number. They will be displayed behind those articles that are displayed in full width.

Thus, you can, for example, put numbers in these four fields: 1 6 2 4, as a result of which the generated blog page will look like this: at the very top, one article announcement will be displayed, followed by six more announcements from of this category, well, at the very bottom there will be a list of four more links.

Clear? No? Then try experimenting with the numbers in these settings yourself and everything will become clear and understandable to you. At the moment, it is not possible to implement in Joomla the display of articles in a blog category or section in columns, and then to the full width of the page. Therefore, you have to be content with what you have.

By the way, the number zero in any of these four fields, except for "column", will mean that none of the materials in this category will use this display option. This is what we examined the main parameters that can be changed when creating a menu item in Joomla. Now let's go to the advanced tab:

Here are the settings that are responsible for the order of the articles. There are a lot of options - by date, alphabetically, in the display order that you specified in the content manager (of this category).

You will need the Order field if you are creating a menu item for a section that contains more than one category. In this case, you can choose the way you want to sort the categories in the section, according to which their list will be displayed on the page, formed on the basis of the section blog template.

The "Sorting" field determines how the articles themselves are displayed when they are displayed. By the way, when creating a menu item codenamed "Section Blog Template", you can sort all articles without regard to their belonging to a particular category, but for this you need to select the "Default" option in the previous "Order" field.

If you choose the "Display order" option, then the articles from the selected Joomla categories will be displayed on the page in the order that you specify in the material manager, by filtering only by it.

There are two ways to sort articles in the content manager that belong to the category we need. You can arrange the desired numbers in the "Sort" column and click on the floppy disk located next to the name of this column. And you can also use the green arrows in the same column, but with a large number articles it will be, perhaps, inconvenient.

In the Pagination column and the next few columns of the advanced settings of the menu item based on the category or section blog template, you can hide and show the pagination. For example, if there are more materials in the displayed category than you specified in the settings described above, then Joomla will add numbering (pagination) at the bottom of the generated web page with a blog, if you do not prohibit this in the “Pagination” field.

Do not forget that articles intended to be displayed as part of a blog in Joomla must be prepared accordingly, namely, you will need to open it in a visual editor for editing, put the mouse cursor after several paragraphs of text and click on the " More details"Located at the bottom of the editor window.

As a result, at the position of the cursor, a line will appear that separates the text of the announcement. Only the announcement above this line will be displayed on the blog.

Display of individual material, list of categories or articles

Let's now go over the settings that you can set when creating or editing a menu item based on standard template section. To get started, go to the admin panel, select from the top line "All menus" - "The name of the one you need." In the window that opens, click the "Create" button located at the top.

In the opened tree of items that you can create, click on the option "Materials" - "Category" - "Standard section template". As a result of these actions, a window with settings will open.

Remarkably, its left side will look exactly the same as in the one we reviewed earlier. The main difference lies in the points of the main parameters:

In the "Section" field, you will have to select a section, the list of categories of which will be displayed when you click on this link in the menu. By the way, the visitor, when viewing the list of categories, will be able to view the list of materials in each of them, simply by clicking on its name with the mouse. The purpose of the "Description" and "Picture" fields is similar to that described above.

The purpose of the rest of the fields will be easier for you to see in action than to read about it. All other settings are no different from those discussed above.

Let's try to create a menu item in Joomla based on a category list template and see how the settings differ:

In the settings below, you can set the number of articles displayed in the list, as well as enable or disable the display of list column headings, creation date (you can set your own format for it) and a filter that will allow you to sort materials by titles, authors, or by hits (number views of the material by visitors).

Well, and finally, I will say a few words about creating a menu item in Joomla based on a standard material template. Everything is quite simple here, in the main parameters there is only the ability to select the article you need from the material manager, which will open when you click on the menu item link.

It is possible that this bourgeois vision of successful blog promotion will be useful to you (the author of the most popular blog on SEO in the bourgeoisie):

Good luck to you! See you soon on the pages of the blog site

You may be interested

Creation and display of articles (content) in Joomla using sections and categories, a blog on Joomla and the More button
Contacts for the site and the form feedback using the built-in Joomla component
What is Joomla
Modules for displaying a list of sections in Joomla, random and latest news, similar materials, arbitrary photos and Html code
Menu in Joomla - adding a nested or drop-down menu, as well as creating and configuring a module to display it on the site
Modules in Joomla - viewing position, setting and displaying, as well as assigning class suffixes
Organizing content in Joomla - deleting and creating articles in the admin panel, as well as setting parameters for all materials
Component K2 for creating blogs, catalogs and portals on Joomla - features, installation and russification
Joomla admin panel - a complete manual for all the settings of the Joomla admin panel in details and pictures

In the top menu, select the item MATERIALS- CATEGORY MANAGER- CREATE A CATEGORY

In the form that opens, we are interested in 3 fields:

  • The title, where we write the name of the category, in our case it will be BLOG
  • Alias, if we leave this field empty, then the alias will be automatically generated, translating the category name into Latin
  • PUBLICATION PARAMETERS- AUTHOR push USER'S SELECTION and in the pop-up window select the desired user, who will be the author of the material
Now press SAVE & CLOSE
The second way to create a category is when we are already in the MATERIALS MANAGER, the CATEGORIES tab, you just need to click CREATE and continue according to the above scheme.
We will return all here only at the optimization stage.

Publishing Articles

The next stage is the publication of materials, i.e. articles in BLOG, for this we also go: MATERIALS - MATERIALS MANAGER - CREATE MATERIAL.
Or if we are in MATERIALS MANAGER, then go to the tabs MATERIALS and press CREATE.

In the form that appears, we need to fill it in:

  • Title where we write the title of the article
  • Alias, if we leave this field empty, then the alias will be automatically generated, translating the name of the article into Latin
  • Category, select the desired category from the drop-down list, in our case it is BLOG
  • If we need the article to be published on the main page, then we need a FAVORITE drop-down list and select YES
  • Author, in the same way as when creating a category
  • The article itself
Now press SAVE & CLOSE

The icon should change its color, which means that it is published on the main page and if you go to the tab SELECTED MATERIALS - MATERIALS MANAGER, then you will see it in the list, in order to remove it from the publication you need to do the same operation or in the editing mode of the article in the drop-down list SELECTED select NO

The last preparation before shamanism, you need to create a menu item, for this we use MAIN MENU

Come on MENU- MAIN MENU- CREATE MENU ITEM, or, as you already guessed, if you are in the menu manager of the main menu, simply press CREATE

In the list that appears, we need:

  • Select the type of item in the window that appears BLOG CATEGORIES
  • The title of the menu, where we write the name of the menu item, so it will be displayed on the site, in our case we write BLOG
  • Alias, if we leave this field empty, then the alias will be automatically generated by translating the name of the menu title into the Latin alphabet
  • Mandatory parameters, select the desired category, in our case BLOG
Push SAVE.

We go to the site and see that not everything is so smooth, now our task is to comb everything

Setting up a blog

Now the magic of customization itself begins, revealing the main secret that in Joomla! there is a certain hierarchy of settings, in our case ARTICLE - CATEGORY - MENU ITEM, i.e. the article settings are used first, if the rest are set by default, i.e. they are taken from the settings of the article, at the beginning I said that we do not touch anything else, in order to comb the entire blog we are interested in the settings of the menu item, changing from we will change the settings of all articles, this is very important in wordpress, this is not, and I think this is the main drawback, there this is achieved only by programming and plugins, i.e. for a non-programmer, as a rule, this is not available.
One more nuance, all settings fields support tooltips, in which the purpose is fully described. of this field, so let's go:

Tab PARAMETERS CATEGORIES

  • Category header - allows you to manage the publication of the category
  • Category Description - allows you to manage the publication of the category description
  • Category Image - allows you to manage the publication of the category image
  • Subcategory levels - within the framework of this article, we are not scattered
  • Empty Categories - Default, Hide, Show
  • Lack of materials message - default, hide, show
  • Description of subcategories - within the framework of this article, we do not scrutinize
  • Number of articles in a category - default, hide, show
  • Subtitle of the page - within the framework of this article, we do not scrutinize

Key tab for us BLOG LAYOUT PARAMETERS

  • Full width - here you need to specify how many articles we want to publish on the full width of the template (content)
  • Introductions only - here you need to specify the number of materials that will be displayed in the columns
  • Number of columns - here we indicate the number of columns for articles from the previous paragraph
  • Number of links - here we indicate the number of articles that will be published at the end of the page as links
  • The order of placement in columns - here we indicate how the material will be placed in the columns: by default, from top to bottom, across
  • We do not consider the next 2 points
  • Sorting order of the category - here we choose how we will sort the category
  • Order of materials - here we choose how we will sort the material in the category
  • Date for sorting - if a date is used in sorting, then select which date to use for sorting: creating, changing or publishing an article
  • Pagination - default, hide, show, auto, i.e. choose how we will display page navigation
  • Pagination Results - Default, Hide, Show

the last actual tab for us MATERIAL DISPLAY PARAMETERS, a customization option is added here - use material settings.

  • Title - allows you how to display the title of the article
  • Title as a link - whether to make the title in the form of links
  • Introductory text - display the intro text on the article page in full display
  • Category - whether to show the category of the article
  • Category as a link - whether to create it as a link
  • Parent category header
  • The heading of the parent category, as a link - within the framework of this article, we do not scrutinize
  • Author - whether to publish the author of the article
  • Author as a link - whether to make it as a link
  • Creation date - whether to publish it
  • Date modified - whether to publish it
  • Date of publication - whether to publish it
  • Navigation - whether to publish it
  • Rating - whether to publish it
  • Show "More" - whether to publish it
  • Show title along with More details - i.e. next to the text, the title of the article is published in more detail
  • Show icons - means printing and Email
  • Print icon - whether to publish it, i.e. users will be able to open a printable version of the page
  • Email icon - whether to publish it, i.e. users will be able to send a link to the article to another
  • Number of views - whether to publish it
  • Show links to unauthorized
The material is based on latest version Joomla! line 2.5, by the way there are many positive changes in terms of CEO.
And a couple more tips, before starting the implementation, spend half an hour on design, i.e. how you want your blog to look.
Don't be afraid to experiment, play with the settings!

PS if you notice a typo or inaccuracy, write down in this thread, the material is voluminous, it is possible that you missed something

From the author: I greet you, dear friend. At this time, blog sites are very popular. Thanks to which, their owners run their business, or simply publish information on various topics. Therefore, in this article I would like to show you how to create a blog in Joomla.

The word, blog, is very familiar to almost any web developer, since the sites of this group are very popular at this time. But novice webmasters often ask “what is a blog” and “how does it differ from a regular site”.

A blog is a site, the main content of which is regularly added posts, consisting of text and some multimedia files (images, video, audio). At the same time, the records are usually ordered in reverse chronological order, belong to a specific topic and are divided into categories. Typically, blogs are available for everyone to visit and provide the ability to add comments to each post, which forms a kind of communication environment, users with the author of the posts, or the site as a whole.

On the blog, you can have both personal entries of the author and entries that are of some informational nature, for example, training materials and articles.

A blog is a relatively simple site and almost any content management system can be used to create one. As mentioned above, in this article we will talk about how to create a blog on Joomla, especially since this CMS, in its basic functionality, contains tools that allow you to implement a blog-type site. True, the mechanism for adding comments, without installing third-party extensions, cannot be implemented, but this is fixable, since at this time a sufficient number of ready-made comment components have been created for Joomla.

So, let's agree that the CMS Joomla is installed and ready to work. If you do not know how to install this CMS, then on our website, in previously published articles, there is a detailed step-by-step instruction on Joomla installation on local computer... Now go to the admin panel and open the category manager.

As I said, all blog materials are divided into separate categories, therefore, using this manager, you need to create several categories of the future blog. To do this, click on the "Create" button.

To add a new category, it is necessary in the "Title" field, indicate the name of the future category (its title) and, if necessary, register short description in the Description text area.

Categories on a blog can be either single-level or multi-level. Therefore, if you plan to implement a multi-level system of categories, first, you need to create categories top level, that is, parental. To do this, in the “Parent” field, select the value “- No parent-”, which indicates to CMS Joomla that the created category is a parent. Further, to create child categories, in the above field, you must select the parent category in relation to the created one (the created categories will be added to the list of the “Parent” field).

Having added the required number of categories, you can proceed to the creation of materials, that is, the content of the future blog, but before that, I would like to add several tags that, like the categories, will divide the site materials into separate groups and greatly simplify the search for the necessary information. Labels are defined keywords that briefly describe the content of the material or recording. To create labels, go to a special manager.

As usual, by clicking on the "Create" button, we will go to the page for creating a new label.

To create a new tag, it is enough to indicate its name in the "Title" field. If necessary, in the "Description" field, you can add brief information, as well as fill in the fields on the available tabs, thereby adding additional information that is necessary to create pages for displaying information about tags and materials associated with a specific tag.

Now you can start creating blog content, which means we go to the material manager.

On the “Material” tab, specify the title of the future article in the “Title” field, select a category using the “Category” drop-down list, select a suitable label from the special “Tags” field and add the text of the future article to the text area. As you know on the blog, it is rare when all the material is shown in its entirety, on the pages where the list of articles of a particular category is displayed. Usually, only the introductory part of the material is displayed, and the full text is available only on the detail page. Therefore, the main content of the record, which will be added to the text area, must be divided using the "Details" button (by placing the cursor in the desired place in the text, click on the button).

On the "Publishing" tab, add information that will form the meta tags of the future page, which is necessary for SEO optimization.

Modern trends and approaches in web development

Learn the fast growth algorithm from scratch in site building

This completes the creation of the material, you can click on the "Save" button to save the information to the database.

This concludes the Joomla blog, with the exception of the added posts display page, so let's create one. To do this, go to the menu manager to create a new menu item (I will create a new menu item to display the added materials, although you can edit an existing one).

First of all, we select the type of menu item in the field of the same name. To implement a blog, you need to select in the “Materials” component, the “Blog category” layout and select a category (this can be a parent category), the materials of which will be displayed on the screen. Then, in the "Menu title" field, indicate the name of the new item.

The "Blog layout options" tab contains settings for the appearance of the future page.

Purpose of the main fields:

Full width - the number of materials that will be displayed in the full width of the central area of ​​the site page. This parameter is relevant if column breaks are used.

Introductions only - the number of introductions of materials on one page (the rest of the materials will be displayed on the next page). Full width material is not counted.

Number of columns - breaks content into columns. 1-2-3-4 columns can be set.

Number of links - determines the number of links to other articles on the site.

The rest of the tabs are used to additional settings pages for displaying materials, for example, whether to show the category title, its description, image, descriptions of subcategories, etc.

After completing the settings, click on the "Save" button. Now you can go to the user section and see what happened.

Now it remains to choose or create a template for the future site, and it must be unique, beautiful, understandable and modern, since the site template is its face, and this is the first thing that the user sees when visiting the first page of the blog. If you are interested in the topic of creating your own templates, our course will be useful to you.

Also, if you wish, you can add several modules that will simplify navigation on the site, for example, the category module and the module of the last added materials.

This question of how to make a blog on joomla is exhausted. All the best and successful coding to you !!!

Modern trends and approaches in web development

Learn the fast growth algorithm from scratch in site building

What is override or templating in Joomla, we met in the previous article. We also talked about how to override the layout of the breaking news module. This article will be devoted to the blog of categories, or rather redefining the standard layout of the blog of categories for the needs of a particular site.

I think it's not worth explaining what a category blog is, but just in case to make it clearer, look at the screenshot with a small example of how the materials displayed in the form of a blog might look:

I decided to build the article as follows - first we will talk about why you may need to override the layout of the category blog, then consider the code of the standard file responsible for displaying the category blog. After that, we will shorten this file by removing all unnecessary code from it, thereby, albeit insignificantly, but speed up the page load speed. And in conclusion, we will make certain adjustments and change the standard view when displaying category materials.

Why override the category blog layout?

The answer to this question is simple enough - to reduce the page size or dramatically change the appearance of the category blog layout on the site pages.

Everything is clear with the appearance, but how does the redefinition affect the page size? Everything is simple, let's say we need to display the materials in the blog as follows - an image, a title, a short text, a button in more detail, and nothing else is interesting for us. But the standard file responsible for the layout of a category blog contains a lot more code than most sites might need, and can therefore be significantly reduced in size.

Thus, by reducing the file size, we will reduce the page size, and also, albeit slightly, but reduce the load on the server, because it will need to perform fewer actions.

Files responsible for the category blog layout

  • blog.php- the main layout for the entire page as a whole, includes the title of the menu item, title and description of the category, category tags, materials in the form of a blog and pagination (the type of menu item is "Category Blog"). In addition, an additional file blog_item.php is used to display each specific material.
  • blog_item.php- responsible for the layout of the blog post. Displays the title of the article, rating, summary, detail button, and so on.
  • blog_children.php- is responsible for displaying subcategories.
  • blog_links.php- displays the titles of materials in the form of regular links. The number of such links can be specified in the blog layout parameters.
  • default_articles.php- is responsible for displaying materials in the form of a list (type of the menu item "List of category materials"), but at the moment it is not interesting to us.

There are other files in this folder, but they are not of interest to us now.

Standard files responsible for the category blog layout and their code

Before you start redefining the layout of your category blog, it's a good idea to understand the code of the original files to help avoid errors when making changes to them. But first, let's copy original files(we need the blog.php and blog_item.php files) from the above folder to the / templates / template_name / html / com_content / category folder.

The blog.php file is responsible for the layout of the category blog in Joomla 3.8.1

As I said, the blog.php file is responsible for the entire category blog layout - for displaying the title of the menu item (if used), category title, list of materials, tags, pagination, and so on.

Let's open this file (from the html / com_content / category folder of the current template) and look at its code. At the very beginning (lines 1 through 30) is the license and copyright information, followed by the line for security and variable declarations.

Next, the code that is responsible for displaying content begins. The first 5 lines are responsible for displaying the page title, to be more precise, the title of the menu item will act as such a title (if "show" is set). To make it clearer, I decided to add comments to the code and show it as screenshots:

Following the tags is (again, if set in the settings) the description and image of the category:

Now the check for the presence of materials in this category begins, if there are no materials, a corresponding message will be displayed:

Now the most interesting part begins - the output of category materials. Moreover, for displaying materials in the blog, three different ones are used, specified in the settings of the blog layout: in full width, in columns and in the form of links. And for each of these options, there are three different blocs code.

At the beginning there is a code responsible for displaying materials in full width, their number is specified in the blog layout settings:

The next block of code is responsible for displaying materials in columns, the number of such materials and the number of columns are also specified in the Joomla blog layout settings:

The blog.php file ends with a code that is responsible for displaying materials in the form of regular links that follow the main materials, and at the very end of the file there is a code responsible for pagination (page navigation):

The blog_item.php file is responsible for the appearance of blog posts

The next file that forms the layout of the blog page is called blog_item.php. By using of this file the external appearance of the materials is set - the image of the introductory text is displayed, the text itself, the button in more detail, Additional Information, such as creation date, author, etc.

As in previous file the very beginning of the blog_item.php file contains the copyright information and the required variables are declared. Next is the main code that is responsible for the appearance of the material.
To figure out what's what, look at the screenshot:

The screenshot does not show the complete code, but everything below is not of interest to us. In order to change the appearance of the output materials, we will work exclusively with these lines of code. The files blog_children.php and blog_links.php do not see the point in more detail, they are rarely redefined.

On this, perhaps, I will finish the article, it turned out to be quite large. In the next part of this article, I'll show you how to edit the layout of a category blog and in particular the blog.php and blog_item.php files to make the category blog unique.