Jump to content

[solved] tpl files are not compiled


Recommended Posts

Hi all, I'm running 1.5.4.1 and i have a problem with tpl files.

 

I have the cache disabled and template cache setted to force compilation.

 

I have installed the module for clearing cache and also deleted all files in /cache/smarty/compile and /cache/smarty/cache and inside my theme cache folder

 

I don't have any caching systems ( like varnish etc ) in background.

 

Hovewer if i edit any tpl file, no changes are visible in the front end. Of course my browser cache is empty.

 

At the moment i'm on localhost with xampp enabled.

 

What should i do? Thanks for all

Link to comment
Share on other sites

I know that this may be dumb question, but... are you sure that you editing correct theme .tpl files?

Moreover, if you editing module .tpl files you should chceck themes/your_theme/modules/your_module/ directory for this file. if this file exists there - you should apply changes there

Link to comment
Share on other sites

You are right: the theme has the module folder inside. ( yes i am a dumb sorry ^^" but i am new to ps :) )

 

By the way i have another question about my module tpl file:

 

this is my install code

 

return parent::install() &&
 $this->registerHook( 'top' ) &&
 $this->registerHook( 'header' );

 

and this is my function for the tpl file

 

public function hookTop( $params ){
 return $this->display( __FILE__ , 'blockinfo.tpl' );
}

 

Am i wrong in something?

Link to comment
Share on other sites

This is my module structure

 

42b6029b2eb3c7c2e8b43ea331e840f7.png

 

and inside the tpl, there is just a string : "THIS IS A TEST". I added the " / " sign, but in the front end the string isn't displayed :(

Link to comment
Share on other sites

I found on the guide for module developing this text:

 

hookDisplayLeftColumn(): will hook code into the left column – in our case, it will fetch the MYMODULE_NAME module setting and display the module's template file, mymodule.tpl, which must be located in the /views/templates/hook/ folder.

 

So i did this in the first time, but it didn't work. Then i tried to put the tpl file into the root of the module folder and still no results :(

 

At the moment the file is located in the module root.

Edited by Isb (see edit history)
Link to comment
Share on other sites

Ok now there is another problem: when i'm going to install the module ( via upload form ), it triggers the error "module not found", and if i try to uninstall the module, it triggers a fatal error:

 

Fatal error: Call to a member function uninstall() on a non-object in /home/wwwsite/isaytest.com/htdocs/stereomuch/controllers/admin/AdminModulesController.php on line 574

 

I'm using the same zip i sent to you.

Link to comment
Share on other sites

  • 2 months later...

Hi vekia,

 

 

I have created a different type of module for category, its working fine.

 

When here add a new category then not showing it.

 

and if this file update any small thing then showing it. and again add a new category then same problem vise-verse.

 

Please help me.

 

thanks

Amit

 

i think that your question is not related to the main case here, please create separate thread, im conviced that then it will be more visible to other developers and community memberts

 

thanks in advance

Link to comment
Share on other sites

sorry to bother you but if we all will follow forum rules, then the whole community will be better place for everyone :)

 

here is a simple pic:

sE1JazE.png

 

 

just go to the correct forum section and press the blue button "start new topic"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...