Template in Module

Hello,

after searching the forum and google as well I didn’t found an answer to my problem. So I’ll post it here.

What I’m trying to do:
I have created a module which should do an image upload. To get an entry in the shops main menu I’ve created a category. For this category I’ve set the [B]Alt Template[/B] field with “my_template.tpl”.

Then I’ve created theTPL file under

<vender>/<module>/application/views/tpl/my_template.tpl

I’ve registerd the template in the [B]metadata.php[/B]

'templates'   => array(
        'my_template.tpl'      => 'picture-vision/pv_image_upload/application/views/tpl/my_template.tpl',
    ),

[B]My Problem:[/B] the template is not beeing found.

Any hints?

Thanks in advance
FrW

If you add new entries to metadata.php after you have already activated this module, you need to deactivate it, clear tmp/ and activate the module again to get the fresh metadata.

If it still does not work, you neet to check if the template entry exists in the database (table “oxconfig” in “aModuleTemplates”)
You can use dev-console for this purpose:
just copy-paste this code

var_dump($cfg->getConfigParam("aModuleFiles"));

into the upper textarea and hit “run code”

and also check the path for typos. Thats actually the most common problem.