ikramy
March 16, 2016, 12:00am
1
I'm re-skinning multivendor, so I cloned the default responsive theme.
I can see that the theme has a folder called "templates/blocks/static_templates" which has a list of blocks that can be used in the admin.
My question is, can I create my own block/tpl file in this folder and use it in the admin?
and How?
Thanks
Hi,
Is better to create in the my_changes add-on folder
design/themes/[THEME_NAME]/templates/addons/my_changes/blocks/static_templates/[NEW_BLOCK_NAME].tpl
"My Changes" add-on needs to be active
You can create as much files you need
If the category structure is missing you need to create
I hope that helps, --- Valentin part of hungryweb.net
ikramy
March 16, 2016, 12:00am
3
Thanks vali, I want to try that but yesterday I uninstalled my_changes from the admin.
Any idea how to install it again? Thanks
ikramy
March 16, 2016, 12:00am
4
I managed to re-install the my_changes add on, and I reactivated it.
I also followed your steps but I couldn't see the block I created in the admin!
Any idea?
The issue is in cache (system, not templates one). Just add &cc&ctpl to the URL in the admin panel. E.g.
http://your_domain.com/your_admin.php?cc&ctpl
Also please note that the new block can be found in the list of templates of the block with the Template type
http://prntscr.com/agavb1
ikramy
March 17, 2016, 12:00am
7
No luck guys, I did all that with no luck.
Here is what I did exactly:
1- I copied "design\themes\mytheme\templates\blocks\static_templates\logo.tpl" TO "design\themes\mytheme\templates\addons\my_changes\blocks\static_templates\mylogo.tpl"
2- I changed the first line in mylogo.top FROM
{** block-description:tmpl_logo **}
TO
{** block-description:tmpl_mylogo **}
3- I made sure the my changes addon is active in the admin
4- I cleared cache as suggested
http://localhost:8080/w/multivendor/admin.php?dispatch=block_manager.manage&cc&ctpl
5- I also deleted all the files from "var\cache\templates\mytheme"
6- I went to admin > design > layouts and tried to add a block but didn't see my new block in the list of available blocks!
{** block-description:tmpl_logo **}
means that this template will be named tmpl_logo an you should see 2 layout of "Logo" in the list ;) please remove that code and you should find the template named
_mylogo
and if you want to add a name to this template you just go to Language > Variables and add this value
name=mylogo
valu=My Logo
ikramy
March 17, 2016, 12:00am
9
Thanks vali but it didn't work! This is driving me crazy.
Please make sure that the My changes module is installed and active. I have just created several static blocks for one project without any issues.
ikramy
March 17, 2016, 12:00am
11
It is installed and active.
I'm on the trial mode of multivendor but it is not expired yet. Could that be the issue??
Thanks
...
6- I went to admin > design > layouts and tried to add a block but didn't see my new block in the list of available blocks!
You should find it here:
1. Add new block
2. Select the new block
Content of the file mylogo.tpl should not include {** block-description:tmpl_logo **} because than you you find in list two templates of Store logo
Please check before adding the block
My Changes add-on is active
You add mylogo.tpl into the active theme
Clear cache
If the Vali's answer does not help you, please PM me temporary FTP access so that we can check the issue. Trial version cannot be the reason
ikramy
March 18, 2016, 12:00am
14
Vali, thank you very much it works. I didn't know about clicking the "Template" icons.
Thank you everyone for help :)
It was mentioned in my post #6. :) Anyway, we are glad to hear that the issue is solved. Have a great weekend!