Active
Project:
Content Templates (Contemplate)
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Jun 2009 at 10:21 UTC
Updated:
10 Sep 2009 at 20:32 UTC
I've noticed that if I call a template.php custom function from inside a contemplate file, it works well on the frontend, but it gives me an undeclared function error when I enter the contemplate backend.
Including template.php in the contemplate file with 'require_once...()' solves it for the backend, but then complains in the frontend, because template.php is already included.
I woudn't want to have to duplicate this functions inside the contemplate file.
Comments
Comment #1
andrenoronha commentedthat happens because the function inside template.php only works for the custom theme where the file is.
my question is:
is there a way to make it works without having to declare it in the template.php of my admin theme?
Comment #2
andrenoronha commentedok, i got a solution.
before printing the function I checked if it really exists.
in the backend of contemplate it will do nothing. so no bugs.