开发者

Custom section/category viewing in Joomla

I have written some modules to have it look nicely. What I need now is to re-order Joomla's standard viewing of the content. I have looked into com_content, and my first idea was to write my own component for it. But now I realized it would be about 90% a copy of com_content.

The problem is: When you open a link to a section, com_content views a list of the categories. But I want a list of the articles in category News of each viewed, and a link to every article in category Infos on the menu to the left. And of course, view each on click.

Is 开发者_运维百科there a way to achieve that without writing an own component? Or would it be advisable to customise com_content to my needs? I want this done with a minimum of fuss and complexity.


You can override components view-templates in your theme.

In your case, for articles: Articles are part of the content component. components/com_content/views/article/tmpl/default.php is the default view of an article.

To override it copy the file to templates\<yourtheme>\html\com_content\article/default.php.

As an example, see the default theme ja_purity or beez, which also override it.

That way, you will only change the layout and only for your theme. The component will stay in tact and updates will not be as complicated as otherwise.


The visible components on your website are called modules. See the modules section in the admin section. The category-view is one of the default modules. There is also a module to display a list of categories (AFAIK). That is what you want, right? The modules listed in the module section are not all available ones, but all that are created. You can create a new one and set its type to the category-list for example, and define in what block of the theme it should display.

If you want to do your own Module, do so. Code it, then add it in your admin section and you’re done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜