Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
Dave (Guest)
Dave (Guest)
I am using viart 3.4.5 and I have noticed that I can’t add the “Products (Categories List)” and other blocks block to custom pages or the site map page.
 
Is there a reason for this?
 
The only blocks I get to choose from are.
 
Login Form
Newletter Subscription
Poll
Languages
Currencies
Layouts
Site Serach Form
 
DickS
DickS
I also find it annoying that there seems to be some control about blocks. E.g. some blocks can only be added to the details page, etc.
 
I dont know if there is a technical reason but it surely limits the design options.
 
SajMalik
SajMalik
I have been wondering the same - I was expecting to have the same full choice for every page.
 
dani
dani
So how would one put the subcategory list code into a custom block? I could make an html menu with links but I don't like the idea of having to edit the menu if a category is added or deleted, kind of defeats the point of having a CMS..
 
Gustaf
Gustaf
We ran into the same problem and found that this issue lies deep in the PHP code. The good news is that by commenting out only 2 lines of code you can give all pages access to about 99% of all blocks.
 
Let me know if you would like details on the fix.
 
SajMalik
SajMalik
Useful, Gustaf - why not put the file name and line numbers here?
 
Gustaf
Gustaf
This is for version 3.6 though I imagine other version would be quite similar. Also, our site is heavily modified, so the line numbers may differ slightly.
 
File: admin_layout_page.php
 
Comment out line 1047 which reads:
if (strlen($art_cat_id) != 0 || $page_name == "index" || $page_name == "support_new" || $page_name == "basket") {
 
Comment out line 1147 which is just: }
 
Ibn Saeed
Ibn Saeed
This is not the case with v4.
 
You can add Categories List to Custom page. No need for any hack.