Home » Forum
NoNumber!

Joomla! extensions & websites
development / support / consultancy

I try to respond within 24 hours (excluding weekends). If I haven't responded by then, feel free to post a reminder or bug me via email.
Welcome, Guest
Please Login or Register.    Lost Password?

accessing variable defined in the index.php of the template
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: accessing variable defined in the index.php of the template
#4955
accessing variable defined in the index.php of the template 10 Months, 2 Weeks ago  
Hi!
I searched in this forum but found no answer to my simple problem
From sourcerer and within an article, I would like to access variables and functions defined in the index.php of the joomla template.
For example, in the template JA_purity, the file index.php includes ja_vars.php and I need to use some variables defined in it.

Is it possible ?
thxs a lot for your help.
Phil
philou
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#4959
accessing variable defined in the index.php of the template 10 Months, 2 Weeks ago  
Unfortunately no.
This is because Joomla generates the content (component) before it passes it on to the template. So the code in your article is executed before the template file is called on.

What is it exactly you want to do? Because ReReplacer could help out... maybe...
Peter van Westen
Admin
Posts: 4533
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#4990
accessing variable defined in the index.php of the template 10 Months, 1 Week ago  
Well, in fact, in all my articles I need to use some functions I created in one of my own PHP files. Instead of importing this file in all my articles, I thought I could put the "import" into the index.php of the template. In this way, the functions could have been available everywhere in my code.
philou
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#5103
accessing variable defined in the index.php of the template 10 Months, 1 Week ago  
No better solution to my problem than importing my libraries at each time I need a function?
philou
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#5104
accessing variable defined in the index.php of the template 10 Months, 1 Week ago  
Not really.

Or you have to add the import to the core files (index.php).
Peter van Westen
Admin
Posts: 4533
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#5129
accessing variable defined in the index.php of the template 10 Months, 1 Week ago  
Ok. I will import from sourcerer, then.
Thanks for the information
philou
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Joomla Open Source Training