Setting variables
Moderators: ooffick, General Support Moderators
Forum rules
-
- Joomla! Apprentice
- Posts: 9
- Joined: Tue Jan 05, 2016 11:16 am
Setting variables
Hi there,
I need to be able to set some variables that are accessible in every page of my Joomla site.
Could someone tell me the best way to do this please?
Thanks in advance
John
I need to be able to set some variables that are accessible in every page of my Joomla site.
Could someone tell me the best way to do this please?
Thanks in advance
John
Last edited by toivo on Sat Oct 06, 2018 5:34 pm, edited 1 time in total.
Reason: mod note: moved to 3.x Coding
Reason: mod note: moved to 3.x Coding
- Webdongle
- Joomla! Master
- Posts: 44071
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Setting variables
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 9
- Joined: Tue Jan 05, 2016 11:16 am
Re: Setting variables
Thanks for that. After reading it, I'm not entirely sure if it will do what I want. I need the same variables to be set permanently for everyone who visits the site. Apologies if I've read it wrong :-)
- Webdongle
- Joomla! Master
- Posts: 44071
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Setting variables
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 9
- Joined: Tue Jan 05, 2016 11:16 am
Re: Setting variables
Ah, thanks very much. I think that will work! :-)
- Webdongle
- Joomla! Master
- Posts: 44071
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Setting variables
Is not the second link just the practical application of the information of the Joomla docs page I first linked to ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 9
- Joined: Tue Jan 05, 2016 11:16 am
Re: Setting variables
I'm not sure, you're the Joomla Master, not me.
- Webdongle
- Joomla! Master
- Posts: 44071
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Setting variables
You are the one writing the extension so you should know if they are both the same coding that works in your extension.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 9
- Joined: Tue Jan 05, 2016 11:16 am
Re: Setting variables
I am not writing an extension.
- Webdongle
- Joomla! Master
- Posts: 44071
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Setting variables
Then why do you need to set Global variables in Joomla ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 9
- Joined: Tue Jan 05, 2016 11:16 am
Re: Setting variables
I'm writing some php that I was going to insert into articles using sourcerer. The code should be able to be copied to a few different websites by just changing 1 variable. Apologies, I'm fairly new to this. There's probably a better way!
- Webdongle
- Joomla! Master
- Posts: 44071
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Setting variables
No a good idea writing that much php to put Directly into Articles. Best use (or create a Component).
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 9
- Joined: Tue Jan 05, 2016 11:16 am
Re: Setting variables
Ah, thanks for the heads up. Guess I've gotta start a whole new journey now!
- Webdongle
- Joomla! Master
- Posts: 44071
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Setting variables
https://docs.joomla.org/J3.x:Developing ... _Component
https://extensions.joomla.org/extension ... component/
https://extensions.joomla.org/extension ... t-builder/
https://extensions.joomla.org/extension ... component/
https://extensions.joomla.org/extension ... t-builder/
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".