S
S
Setitle2020-12-13 12:02:47
Joomla
Setitle, 2020-12-13 12:02:47

How to remove a specific component from a specific page?

Hello, I've been suffering for a long time .. All that I found intelligible about - displays the main content of the page. Those. Roughly speaking, everything in the admin menu "Components". But where is it determined which component is displayed on which page? (after all, not all of them are displayed en masse) Everything is simple with modules, each module has its own name. You see , you go chop off Menu1 or point to inside it on which page to display, and on which not, even if you shout, it will not be displayed. How to remove a specific component from a specific page? This is the main question. Specifically, my situation is this: There are two templates on my site test.consulsib.ru . The site was sawed by at least 4 people at different times. Now I'm studying...
<jdoc:include type="component" />
<jdoc:include type="modules" name="Menu1"/>


untitled - main and shopping cart (because it can't be transferred to another template without crutches)
vmbeez5 - basically everything else.
It's about untitled. In it , in the basket, it displays the virtuemart basket itself - everything is EXCELLENT here. But on the MAIN, it displays a block of goods that, according to the idea (once upon a time) should have changed from the filter to the left. In fact, when filtering, it simply transfers to the catalog on a new page and filters there. That's fine for me! Thus, I want to remove this product catalog near the filter from the main one (there will be a slider instead). How to do it?<jdoc:include type="component" />

Empirically (literally went through all the directories and files) it was determined that it is displayed from here \components\com_virtuemart\views\virtuemart\tmpl\default_products.php. The file itself was finished by hand, even css styles were shoved into it. FACEPALM.
If you cut out the entire file, then the main one is not loaded at all. I left it empty (which is also not entirely true) and, lo and behold, the product blocks disappeared, but .. the frame itself, div, and so on remained, anyway. The same "framework" with its own styles is used when displaying in the shopping cart. Those. changing it, I am already changing the basket, which I do NOT need. And everything is a dead end. Even if I find in virtuemart where it is, it is not clear how to make it not be displayed on the main page and displayed in the basket. AAAAAA...
By the way, I've seen a lot where "components\com_content" is responsible for the component. But I commented out the folder itself, it obviously did not help me.
I would be glad for any help, I would like not only to cope with the site, but to understand how it works and do it without crutches.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
exmmth, 2020-12-13
@Setitle

Hello Setitle !

But where is it determined which component is displayed on which page? (they don't all come out in bulk)

You need to find the Menu item in the top panel - there will be a menu marked with the Home icon. In the menu you will find the menu item which is the main page, there will be settings for what is displayed on the page . The menu items define the link to a specific page of the component or to the component itself, further navigation will be built from it. The general educational program on joomla has the main parts:<jdoc:include type="component" />

  • Menu (For page addressing)
  • Components (Extensions for the main content on the page)
  • Materials (this is the component for the main content on the page in Joomla core)
    • Media Manager (Manage photos and other files from /images/ folder)
    • Fields (Content Extension)

  • Modules (Additional blocks for the site)
  • Templates (appearance, and the /template_name/html/ folder is used to override templates for modules and components from the com_virtuemart\views\...\tmpl folders in particular)
  • Plugins (All sorts of manipulations with saving, outputting, etc.)

Thus, I want to remove this product catalog near the filter from the main one (there will be a slider instead). How to do it?
Empirically (literally went through all the directories and files) it was determined that it is displayed from here \components\com_virtuemart\views\virtuemart\tmpl\default_products.php. The file itself was finished by hand, even css styles were shoved into it. FACEPALM.

Copy the files and \components\com_virtuemart\views\virtuemart\tmpl\default_products.php to the template folder \templates\template_name\html\com_virtuemart\virtuemart\default_products.php and modify it here.
Read more about data output and overrides in Joomla and more about overrides
If you have any questions, ask in the comments

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question