Category blog template joomla 3. Menu type: category blog template


If previously almost every girl kept a diary of personal experiences in her desk, now the entire Internet community is interested in various thematic blogs.

Joomla blog templates are the perfect way created to manage your content. Today, almost every famous person has their own blog. It is very interesting to learn news about the life of your favorite singer or artist, but this does not mean that it is not at all interesting to look through the pages of ordinary people. After all, it is always productive to read useful tips, interesting experiments, as well as the latest news from the fashion industry.

Now there are no difficulties with organizing personal space on the Internet. You can simply scroll through the news and purchase your favorite blog categories for joomla.

Blog templates that are published and accessible to everyone are ideal both for creating an interesting personal portfolio and for a magazine dedicated to fashion trends. There are even special developments designed for music lovers who decided to start their own blog to unite like-minded people. In this case, you will be able to choose both a design and a directly informative series with the main emphasis on the presentation of various video clips and, accordingly, audio tracks. If you wish, you can even create a personal social network without any problems, which will be intended for especially sociable fans of various musical genres.

Have you decided to create your blog on joomla and combine it with online sales? Then you need to pay attention to joomla 3 blog templates, which provide the ability to implement online sales.

Each of the presented Joomla templates is distinguished by its beauty, style, and at the same time you can easily customize it for your own needs.

Hello, dear readers of the blog site. Today we will continue, which we have already raised once before, and also learned. Today we will try to look at various options for displaying articles on website 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 the dynamic page after following a link. In fact, they determine what will be displayed on a particular page.

What are they for and how to work with Joomla menu items

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

At first, it is very difficult to grasp the entire relationship between the menu, its items, the content of 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 either horizontally (most often in the upper part of the window, but it is also possible to create a lower one) or vertically (either in the left or right column of the template).

What’s noteworthy is that the navigation menu item in Joomla can lead either to a page with one single article or to a blog or a list of materials contained in a category or section. Moreover, the same publication can be accessed through different links from the menu.

Some links will open them all alone on a web page, while others will display them as a list or as a blog of the category or section to which it belongs. You probably still don’t quite understand what we’re talking 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 can be accessed from the admin panel by selecting “All menu” - “Menu” from its top line. 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 will make your task much easier. , as well as setting up modules for them.

Having entered the menu manager, you can click on the icon in the column opposite the one you need, which will open a list of all the items that are already there. This page can also be accessed by simply selecting in the admin panel from its top line “All menu” - “Name of what 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, clicking on which will open the wizard for creating a new navigation element:

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 quite simple and clear.

It serves so that we can select the option of presenting the page to which we will go after clicking on the created menu link. In other words, you will have to choose 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 in the tree above there are quite a lot of options and they are divided by type of component (this is), on the basis of which the content will be displayed on the site. We are primarily interested in options that suggest creating 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 focus on considering the output of materials, and everything else will be considered as best we can. So, a menu element in Joomla can link to three main types of pages: with a single article, an entire category or a section.

In addition, a menu element can indicate either an individual component or a category of this component. For example, you can create a link that leads both to a page with a list of all the categories of the gallery you created, and to a page with the content (photos) of just one.

This mess might 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 website on Joomla is to correctly organize the information 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 quite 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, the confusion caused by the confusing system will decrease a little, and clarity will appear 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 available articles between them. And to create on this basis an extensive system of menus and their elements for convenient and understandable output for users will be a matter of technology.

Menu elements that allow you to display articles on the site

To display content that includes articles on your site, you will need to add new elements to the menu from the tree branch called “Materials”. 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 have to understand what this or that option in this branch of the tree serves, and then figure out their settings, which allow us to display blogs or lists of articles in Joomla. Using these settings, you can set the appearance and display order of materials. But first things first.

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

  1. Blog (category or section) template – so called because the way articles are displayed in this case is reminiscent of standard blogs. In this case, a web page generated in Joomla will generally be a series of announcements (introductory parts) of articles that will end with a “More details” link. They will all belong to either one section or one category, which you choose when setting up.
  2. A standard template for a section or category list, which is essentially the same thing. A web page generated in Joomla will be a table that lists either category headings from a certain section or article headings from a certain category.

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

The blog format of a 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 clicking on the “Read More” link.

At the same time, you can quite flexibly customize the appearance of articles. You can set how many announcements will be displayed across the entire width of the page, how many will be divided into columns, set the number of columns and determine the number of materials displayed below in the form of links.

How to create a blog in Joomla based on category articles

Let's first try to create a menu element 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” - “Name of what 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 menu item settings based on the template you selected:

In the “Title” field, as usual, enter the name for this menu element, which will be displayed on the site. The “Nickname” field should only be filled in if . Then you will need.

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

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

In the “Parent Element” column, you can select a parent for the element being created, when you click on it, our nested item will be displayed in the menu. If you do not want to make it nested, you should leave the default option “Top”.

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

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 tabs with parameters responsible for presenting the web page that will be opened as a result of clicking on this link are concentrated. Let's start our consideration 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 as 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 applies to “Picture Description”.

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

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

It's clear? No? Then try experimenting with the numbers in these settings yourself and everything will become clear and understandable to you. It is currently not possible to implement in Joomla the display of articles in a category or section blog, first in columns and then across the entire width of the page. Therefore, you will have to be content with what you have.

Oh, by the way, a zero in any of these four fields except “column” will mean that none of the materials in that category will use this display feature. We have looked at 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 articles. There are a lot of options - by date, alphabetically, in the order of display that you set 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 method you want to sort the categories in the section, according to which a list of them will be displayed on the page, generated on the basis of the section’s blog template.

The “Sorting” field determines the order of the articles themselves when they are displayed. By the way, when creating a menu item codenamed “Section Blog Template”, you can sort all articles without taking into account their belonging to a particular category, but to do this you need to select the “Default” option in the previous “Order” field.

If you select the “Display Order” option, then articles from the Joomla category you have selected will be displayed on the page in the order that you set in the content manager, setting a filter only for it.

There are two ways to sort articles in the content manager that belong to the category you need. You can place the numbers you need in the “Sorting” column and click on the diskette located next to the name of this column. You can also use the green arrows in the same column, but with a large number of articles this will probably be inconvenient.

In the “Pagination” column and the next few columns of advanced menu item settings based on a category or section blog template, you can hide and show pagination. Let’s say that 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, unless you disable this in the “Paging” 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, place 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 cursor position, a line will appear separating the text of the announcement. Only the announcement located above this line will be displayed on the blog.

Displaying a separate material, a list of categories or articles

Let's now go over the settings you can set when creating or editing a menu item based on a standard section template. First, go to the admin panel, select from the top line “All menu” - “Name of what you need”. In the window that opens, click the “Create” button located at the top.

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

What is noteworthy is that its left side will look exactly the same as in the one we examined earlier. The main difference lies in 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, a visitor, when viewing a list of categories, will be able to view the list of materials in each of them by simply clicking on its name with the mouse. The purpose of the “Description” and “Image” fields is similar to that discussed above.

It will be easier for you to see the purpose of the remaining fields 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 allow 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 headings, authors, or by hits (number of views of the material by visitors).

Well, finally, I’ll say a few words about creating a menu item in Joomla based on a standard material template. Everything is very simple here, in the main parameters you only have 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 speaks):

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

You might be interested

Creation and display of articles (content) in Joomla using sections and categories, a blog on Joomla and a Read more button.
Contacts for the site and feedback form 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 for displaying it on the site
Modules in Joomla - viewing position, setting and output, 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
K2 component for creating blogs, catalogs and portals on Joomla - features, installation and Russification
Joomla admin - a complete manual on all the settings of the Joomla admin panel in details and pictures

We touched on the topic of wordpress, here we will consider joomla, namely how to create and redefine output templates. No, no, not a general website template (although we will work with it), but something else that, unfortunately, many developers simply neglect. But first things first.

Let's first look at how templating works in joomla. I will explain in general terms, but so that you understand what patterns I am talking about. We all know that a website has a template that we can change to whatever we want. So, this template may contain sub-templates, namely extension templates. Imagine, you want to change the output style of, for example, some module, let’s take the module for outputting the latest materials. The module can be either native built-in or third-party, in principle it doesn’t matter, the essence is the same. Imagine we need to swap the title of the article and the image of the announcement, i.e. it was - first comes the title of the article, then under it is a picture, then the date, then the text, etc. And the designer drew it like this for us - the picture is above and the title is below. How will we change? Here is the most interesting thing... Many developers do not think about the fact that joomla is a fast-growing system, which is characterized by frequent updates. But many developers find these very lines in the module files and change them as they need. Isn't that possible? Why, it’s possible only after updating the module or engine, if it’s a native module - your changes are ruined and all your work will go to waste. That is, the changed files will simply be overwritten during the update. So, the developers foresaw this and came up with a template system, and in my opinion this is a very correct and convenient approach.

Article structure

So how does template overriding work? Joomla, like most modern engines, works according to the MVC model - model, view, controller. I won’t go deeper now, but I will say that this model provides for the separation of logic from the template. So, it is this template that is placed in the main joomla template. Joomla is designed in such a way that if extension templates are not found in the main site template in the “html” folder, it will remove them from the core. To make it clear, I will give one example.

Let's take a standard component com_content is a joomla article component. Let's try to redefine the type of featured articles. Let's display them, for example, on the main page. To do this, we need to add a template for displaying selected articles of the component to the main joomla template. To do this, create the html folder in the root of the main site template, then the “com_content” folder in it, then the “featured” (selected materials) folder in it, i.e. the path will be something like this - /templates/your template/html/com_content/featured. Now go to the following path - /components/com_content/views/featured/tmpl/ and copy the files default.php, default_links.php and default_item.php into the created “featured” folder of your template. Now edit these files as we need. You will be able to see the changes immediately on the website. Now when you update joomla, your changes will remain intact.

This way you can override the output template of almost any component or module, both built-in and third-party. Plugins do not have templates. On the one hand, redefining templates may seem like a chore - creating folders in a certain sequence; if we do something wrong, the templates will not work. In the latest versions of joomla, starting with joomla 3.2, it became possible to create overrides automatically directly from the site admin panel. To do this, go to Extensions -> Template Manager -> in the list of templates opposite the template being used, in the “Template” column, click on the name of the template and get into the template editor.

Now just click on the extension you are interested in and the overrides will be automatically created in the selected template folder. In my opinion, this greatly simplifies life, because... no need to worry about what folders to create, what to put where, etc.

Also, in addition to component and module templates, we can redefine the appearance of layouts. What are layouts? For example, we need to change the page navigation template. To do this, just create a “Pagination” layout template in the admin panel and change it as needed. Layouts are a new feature introduced in Joomla 3.

Alternative Layout

Now we understand that before changing the output design of a certain extension, we need to create its template. But imagine that the same module needs to be given several designs, i.e. in one section of the site the design is one, in another section the design is different. How to be here? I will say that the developers foresaw this too and created a special option called “Alternative Layout”. You can see this option in the settings of the module or component. For example, in the module settings it looks like this.

For example, let's redefine the template of the login form module on the site and create two templates. To make it clear how they differ from each other, let’s make the login button in one template orange; by default, the login button in the template "Protostar" blue. To do this, first go to the template manager and create an override for the module "mod_login"— Extensions -> Template Manager -> in the “Template” column, select our template, I have this template "Protostar"-> tab “Create override” and in the “Modules” column click on the link "mod_login".

Next we receive a message that the override has been created and the next thing we will do is go to the “Protostar” template folder (if the site is hosted, then it is better to use an FTP client, for example, total commander) and we see that a folder has appeared in the root of the template "html", open this folder, then the folder "mod_login" and we see two template files: default.php And default_logout.php. We can change these files the way we want and we can immediately see the result on the site after refreshing the page. But these changes will apply immediately to all created modules "mod_login", and we need to create two different designs.

In order to understand the essence of the alternative layout, go to the Login Form module settings -> “Additional parameters” tab and make sure that in the drop-down list "Alternate Layout" There is only a default template and that's it.

Now let's create copies of the override templates in the folder mod_login website template (select the file, press ctrl + c, then ctrl + v), we will have files with the prefix “copy”. Let’s rename both files, replacing the prefix “copy” with, for example, "-alternative"(file names must be strictly Latin and do not contain underscores), i.e. we should have two additional files: default-alternative.php And default-alternative_logout.php. Now we look for the button code in the file default-alternative.php with class "btn btn-primary" and change "btn-primary" on "btn-warning"(alert button class in ), i.e. like this - class="btn btn-warning".

Now go to the module settings mod_login and we see that an additional template “default-alternative” has appeared in the “Alternative Layout” list.

That’s it, now we can clone our module and select the “default-alternative” template in the “Alternative layout” option. Now this template will be displayed on the site with an orange login button.

Alternative layout of categories and articles

Just like modules, articles and categories can also be assigned their own alternative output layout. We can override the output of any article or category. When creating a website, you often have to resort to such methods, especially if it is a large site and there is a lot of different information on it.

We can assign an alternative layout to a separate category and a separate article.


It is worth noting right away that the alternative category layout will only work if the category is not tied to a menu item with the type “Category Blog” or “List of Category Materials”. To display an alternative layout for a category that is tied to a menu item, we will use a different method, but more on that below...

Alternate single article layout

Let's create an alternative layout for a separate material. For example, in a separate material I set the H2 title to the pageTitle class, so this material became unique in relation to others. How can this be achieved? We simply create an alternative page layout and assign it to the desired article. To do this, first create an override for the article: Extensions -> Template Manager -> “Template” column, select your template -> Create an override -> in the “Components” column find “com_content”, expand the list and click on the “article” link.

Now go to the directory - /templates/your template/html/com_content/article/ and create a copy of the default.php file. Next, rename this file, for example, default-alt.php. We make the necessary changes to the template (I set the page title to the pageTitle class, if you remember). Now let’s assign this template to the desired article - Materials -> Material Manager -> select the desired material -> Material Display Options -> go down and in the “Alternative Layout” field select our layout - default-alt.

Now if we reload the page we can see our changes.

Let's now give our alternative "default-alt" layout an appropriate name. For example, let's call it this - My alternative layout. To do this, we must add a constant with translation - TPL_ NAME OF YOUR TEMPLATE _COM_CONTENT_ARTICLE_LAYOUT_ ALTERNATIVE LAYOUT FILE NAME ="My alternative layout" - in the template localization file - ru-RU.tpl_ template name .sys.ini.

I'm using the default template "protostar" and the name of my alternate layout file is default-alt.php. In my case, for translation, I added the constant TPL_PROTOSTAR_COM_CONTENT_ARTICLE_LAYOUT_DEFAULT-ALT=”My alternative layout” to the file ru-RU.tpl_protostar.sys.ini (/language/ru-RU/). Now when I select an alternative layout, my name is displayed.

There is an easier method to localize an alternative layout by overriding joomla language constants. I wrote about this in, you can also read. The translation is created from the admin panel and there is no need to go into the files. To do this, go to Extensions -> Language Manager -> Redefining Constants. Next, in the “Filter” field, switch to the control panel area with the desired language (I have Russian, in a multilingual site you will have to create one for each language).

Now click on the “Create” button and enter our constant in the “Language constant” field, for me it is TPL_PROTOSTAR_COM_CONTENT_ARTICLE_LAYOUT_DEFAULT-ALT. In the “Text” field, enter its translation - My alternative layout. Click save. That's it, the layout will also be translated.

I would like to add that our alternative layout can also be defined globally, i.e. by default will apply to all materials. To do this, go to the materials settings - Material Manager -> click on the “Settings” button in the upper right corner -> in the first “Materials” tab, at the very top we see the “Layout Selection” field.

Alternative category layout

In much the same way as for an article, an alternative category layout is created. Create an override of the category article list template (when creating an override, click on the “category” link). Next, go to our template and open the created override folder - category. In this folder we find the files: blog.php, blog_item.php And blog_children.php and create copies of them (select, CTRL+C -> CTRL+V). Let's rename copies of these files, I called them like this: myblog.php, myblog_item.php And myblog_children.php. You can replace the prefix " myblog_» by its name, but the sequence of actions must be exactly like this, otherwise errors may occur. Now in the site admin panel we open the category to which we want to assign an alternative layout and in the “Options” tab we find the “Alternate layout” field. By expanding the list, we will see the layout we created (by default, there are already two layouts: Blog and List).

Let me remind you again! This alternative layout will only be applied if the category is not bound to a menu item with category blog or category list type.

You can also give an adequate name to the layout by creating a language constant - TPL_ TEMPLATE NAME _COM_CONTENT_CATEGORY_LAYOUT_ LAYOUT FILE NAME (copy of blog.php file). In my case it will be - TPL_PROTOSTAR_COM_CONTENT_CATEGORY_LAYOUT_MYBLOG, in the translation field I gave my name - My blog.

So, we have redefined the category blog output template, but if you noticed in the override category folder there are also files: default.php, default_item.php and default_children.php - these are our category list template files. So, if you want to create an alternative category list layout, then you need to create copies of these files. The rest is all the same.

It would seem that’s all, but there is one more point that I also want to talk about. Just imagine our list of category materials, they are displayed in blog format. Let's now change the title of the material in the category list. By default it is H2, and we will change it to H3. Edits are made to the blog_item.php file, but I will be making changes to an alternative layout, the myblog_item.php file. So, if we open this file, it turns out that some blocks are placed in separate files, including our article title. Remember the third column “Layouts” when creating an override in a template. So, now we’ll turn to this column. We need to create layout overrides for the standard joomla article component. To do this, we go to overrides and in the “Layouts” column, click on the “content” link. Now we go to the folder of our template, then the “html” folder and we see that another folder has appeared there - “layouts”. Great! Now let's go to this folder -> joomla -> content and here we need to find the file that contains the title of our article. To do this, let's go back to our myblog_item.php file (in my case) and look for the lines where we display the title. For me it's line 23. It looks like this:

item); ?>

Based on this code, we see that we are connecting a file called - blog_style_default_item_title, that’s exactly what we’ll look for in the layouts folder. I have this file - blog_style_default_item_title.php. You can open it right away and edit it, but I also suggest creating an alternative layout for this header template. To do this, create a copy of this file and rename it, for example, I called it like this - . Now let's go to the file myblog_item.php and change the line

item); ?>

item); ?>

Now, the template file myblog_style_default_item_title.php you can change as you like and the changes will be applied exactly in the category to which the alternative category layout is assigned. This is how everything works. Other templates for the “Layouts” column are redefined in the same way.

This alternative layout can also be defined globally, i.e. will be assigned to all categories by default. Go to the settings of the standard joomla article component and select the desired layout in the “Category” tab.

Alternative menu item layout

Now let's look at another option for creating an alternative layout that is anchored to a menu item. Go to the directory - /templates/your template/html/com_content/categoty and create a copy of the blog.xml file and then rename it to (in my case) myblog.xml. Now let's open this file. At the beginning of the file we will see a structure like this:

This structure is what defines the menu item for our layout. Let's change the following constants to our own, replacing the selected fragment in accordance with the created alternative template and create overrides for them in the language files:

COM_CONTENT_CATEGORY_VIEW_ BLOG _TITLE
COM_CONTENT_CATEGORY_VIEW_ BLOG _OPTION
JHELP_MENUS_MENU_ITEM_ARTICLE_CATEGORY_ BLOG
COM_CONTENT_CATEGORY_VIEW_ BLOG _DESC

I named them as follows:

COM_CONTENT_CATEGORY_VIEW_MYBLOG_TITLE
COM_CONTENT_CATEGORY_VIEW_MYBLOG_OPTION
JHELP_MENUS_MENU_ITEM_ARTICLE_CATEGORY_MYBLOG
COM_CONTENT_CATEGORY_VIEW_MYBLOG_DESC

Go to the language manager and create constant overrides for the control panel area with the language you need. All I had to do was create overrides for two constants: COM_CONTENT_CATEGORY_VIEW_MYBLOG_TITLE and COM_CONTENT_CATEGORY_VIEW_MYBLOG_DESC.

We create a new menu item, select the “Materials” type and see that a new type of our alternative layout has appeared there. I called it “Alternate Category Blog Layout”.

Now the output of articles in this menu item will be displayed in accordance with the created layout.

I would like to warn you that if you create an alternative menu item layout, then you will not be able to select this alternative layout globally or from a category, because it will no longer be available.

Module style

Let's go back to our modules and see what else we can do there to make our lives easier. Until now, we have examined the internal layouts of each extension, talking about the fact that they can be redefined, but the modules also have an outer shell, which was not available to us using the above methods. What kind of shell is this? This is, for example, a block with a moduletable class that wraps each module with standard xhtml output style. You can also include the module title here, which by default is displayed in the H3 tag. Now imagine the situation - you need to change one of the modules, or rather its title, to change the H3 tag to a regular div block with a certain class, say, the moduleTitle class, + also add a span tag inside this block, i.e. frame the title with an additional span tag. This concerned a separate module. But what if you need to display all the modules in a certain module position this way?

Let's figure it out. We can create a unique wrapper and assign it to any module. To do this, create a file modules.php in your template folder, and the full path looks like this - /templates/your template/html/modules.php. Open this file and paste the following code into it:

content)) : ?>

">showtitle) : ?>

title; ?>

content; ?>

But don’t rush to save, we still need to edit it, or, more precisely, create a unique style for the module, otherwise an error will appear on the site in the form of a white screen (with error display disabled), because this style already exists. We are interested in the function "modChrome_xhtm" let's give it a unique name, I called it this way - "modChrome_myStyle". That's it, now the contents of the function can be edited as we need it. As a result, if I implemented my plan, I modernized the code as follows:

content)) : ?>

">showtitle) : ?>
title; ?>
content; ?>

Now you can save this file. The next thing we will do is go to the module manager and open the desired module for editing. Go to the “Additional parameters” tab, go down and in the last filter “Module style” we see that we have an additional style - for me it’s myStyle.

Choose this style and observe the result. If we inspect, we see that instead of the usual H3 title, we now have a div block with the moduleTitle class, which also contains an internal span tag.

This feature of assigning a unique style to each module appeared in joomla 3. I did not see this feature in joomla 2.5. So, if you haven't done this yet.

Now let's look at how to output all modules according to a given style in a specific module position. The modular position in the template is inserted as follows:

name="header" - instead header Enter your name for the modular position.

If you notice, the standard style is displayed in this position - xhtml. Let's replace it with our created one - myStyle, i.e. like this:

That's it, now all modules in this modular position will be displayed according to our style. Respect to the developers for making it possible to customize the template so flexibly!

Additional features

If you noticed in the same tab of the module “Additional parameters”, in addition to the fields “Alternative layout” and “Module style”, there are also fields such as “Module CSS class suffix”, “Caching”, “Module HTML tag”, “ Bootstrap Size", "HTML Header Tag", "CSS Header Class". Well, the “Caching” field has nothing to do with templating, so we’ll omit it for now. Let's look at the remaining fields.

Module CSS class suffix— adds a suffix to a block with the moduletable class. An additional class can be specified either separated by a space or by a hyphen, or even written together. This way, we can uniquely define the module block class and write the styles we want for it.

HTML module tag- works if we select the module style html5. This style is created by default. The option allows you to replace the standard div block with one of the selected ones - section, nav, article, etc.

Bootstrap size— works with the selected module style html5. This option is only relevant if you use

In this article I would like to touch on a very commonly used type of menu - category blog template. In fact, this item allows you to display the contents of a category on the page. The only nuance is the word " blog". In fact, this is just a type of output. For example, on my main page (and in sections) an almost similar option is implemented. However, it is better to see once than to hear a hundred times, so it is better to add a category blog template to the menu and see the result. And we will look at how to add this type of menu in this article.

When creating a new menu item, you need to select the type - " Category Blog Template":

But as for " Options-General" And " Options-Advanced" they need to be reviewed here because they are different from other types of menus.

Let's start with the group " Options-General":

  • Category. In this drop-down list you need to select the category that you want to display.
  • Description. If you wrote a description when creating a category, then here you can either show or hide it.
  • Description picture. If you specified a picture for a category, then you can display it here.
  • Full width. This parameter specifies how much material will be displayed across the full width of the content. Here it is better to look at the result, and you will immediately understand what this option does.
  • Introduction. The number of articles that the user will see with a short description.
  • Columns. Number of blog columns.
  • Links. The number of simple links to articles that appear immediately after all materials are displayed in full width and introductory.

In general, it is better not to describe these parameters, but to look at them right away, and then you will immediately understand. The only thing is that you need to create at least several articles to really see the difference.

And now let's look at " Options-Advanced":

  • Order of categories. This is sorting items into categories. " Title in alphabetical order" - this is sorting alphabetically, " Title vs alphabet", on the contrary, sorting against the alphabet. A " Display order" means that the elements will be sorted according to the order you specified.
  • Sorting. Here you need to select the sorting option you want from the drop-down list. Just in case, hits- this is the number of views of the article, because this word is often found in different versions of localization, and not everyone knows it.
  • Order for multi-columns. Organizing category materials by columns. This only applies to those types of blogs where 2 and more columns.
  • Page splitting. Show or hide pagination.
  • Page split results. If the previous option is enabled, then here you can display the result of the split. For example, " 1-2 of 2".
  • Show feed link. You can enable RSS feed for this category, then people can subscribe to it and receive notifications about updates.

From my own experience, I will say that all these settings often do not need to be changed, so if something remains unclear, then just look at them in practice. Although, most likely, this will not be necessary.







2024 gtavrl.ru.