Page 1 of 2

Overwrite existing templates (Laravel)

Posted: 04 Jun 2015, 10:19
by Yvler
First: thank you for the magnificent shop pack :) Good work

We're trying to change the existing html-templates via an extension. We downloaded the extension via your website (extension builder) and named the dir "ai-optiphar" and placed it in the "ext" dir in our laravel installation.
In the "client/html/layouts" dir we created a dir "catalog/list" with a copy of the "items-body-default.html" file, which we renamed to "items-body-optiphar.html"

But.. still we don't see any difference when we change the text in this HTML file.
Is there an autoloader for these extended layout files, or do we have to change a config file first?
It's pretty vague in the documentation.

Re: Overwrite existing templates (Laravel)

Posted: 04 Jun 2015, 10:36
by aimeos
Yvler wrote:First: thank you for the magnificent shop pack :) Good work
Thank you very much! That's always nice to hear :-)
Yvler wrote: We're trying to change the existing html-templates via an extension. We downloaded the extension via your website (extension builder) and named the dir "ai-optiphar" and placed it in the "ext" dir in our laravel installation.
In the "client/html/layouts" dir we created a dir "catalog/list" with a copy of the "items-body-default.html" file, which we renamed to "items-body-optiphar.html"
You have two options:
- Either leave the name the same (items-body-default.html) and the extension template will be automatically used instead
- Configure your new template if you still want to use the old one somewhere (details are available in http://aimeos.org/docs/Configuration/Co ... oduct_list)

Re: Overwrite existing templates (Laravel)

Posted: 04 Jun 2015, 11:04
by Yvler
Got i!
Thanks

Re: Overwrite existing templates (Laravel)

Posted: 19 Jan 2016, 20:06
by anilsharma
Hi guys , I am also following the same process . I have renamed extention folder in ext folder as ai-templates and copied all html files from vendor folder to this ext file . But does not looks like working . After copying also have done composer autoload but same thing , even had flushed cache too (from shop admin). So am i missing something :?:

Re: Overwrite existing templates (Laravel)

Posted: 19 Jan 2016, 21:27
by aimeos
anilsharma wrote:Hi guys , I am also following the same process . I have renamed extention folder in ext folder as ai-templates and copied all html files from vendor folder to this ext file . But does not looks like working . After copying also have done composer autoload but same thing , even had flushed cache too (from shop admin). So am i missing something :?:
What files did you copy and to what path?
It's hard to say what's wrong without more details.

Re: Overwrite existing templates (Laravel)

Posted: 20 Jan 2016, 09:30
by anilsharma
Ah sorry for the confusion :? , This is how i have proceeded so far :

I created a aimeos extension from your site link and pasted whole folder to ext folder in path laravel-folder/ext .

Inside extension folder which is ai-templates : path ai-templates/client/html/layouts , i have copied all html core files from vendor/aimeos/aimeos-core/client/html/layouts/* to ai-templates/client/html/layouts .

So while testing i can see that still it is calling files from my vendor core folder . Am i missing something ? How these core templates will be overwritten ? Let me know if you need more info .

Thanks.

Re: Overwrite existing templates (Laravel)

Posted: 20 Jan 2016, 12:29
by aimeos
anilsharma wrote: Inside extension folder which is ai-templates : path ai-templates/client/html/layouts , i have copied all html core files from vendor/aimeos/aimeos-core/client/html/layouts/* to ai-templates/client/html/layouts .
You should only copy the template files you want to change so the others will get updated if necessary.
anilsharma wrote:So while testing i can see that still it is calling files from my vendor core folder . Am i missing something ? How these core templates will be overwritten ? Let me know if you need more info .
Did you've deactivated caching for development?
https://github.com/aimeos/aimeos-laravel#hints

Re: Overwrite existing templates (Laravel)

Posted: 20 Jan 2016, 18:57
by anilsharma
Yes i have disabled it . But same problem .

Am i following correct process , First just copy dowloaded extension to laravel ext folder and then just put templates inside layouts folder . Do we need to do something else apart from this ?

Re: Overwrite existing templates (Laravel)

Posted: 25 Jan 2016, 10:00
by aimeos
anilsharma wrote: Am i following correct process , First just copy dowloaded extension to laravel ext folder and then just put templates inside layouts folder . Do we need to do something else apart from this ?
No, normally not. Can you make your Aimeos extension available somewhere?

Re: Overwrite existing templates (Laravel)

Posted: 25 Jan 2016, 21:37
by aimeos
Please clear the cache with

Code: Select all

./artisan aimeos:cache
If it works now, the configuration is wrong. If not then there's something wrong in the extension.