Welcome,
Guest
|
|
I’m developing my websites on Mamp and I also have a dedicated live test environment.
I was bug by having to change the call for my custom code snippets to work on both the local and the live test environment. Yes, I know, I can have my websites using virtual host in Mamp but I also find another easy way... Example of code working on local and live. This is a simple call for a Javascript file, before head, placed in ASTROID Template > Custom Code > Before Head (Work Also in Joomla menus , Astroid options tabs > Custom Code) ./templates/astroid_template_zero/js/aos.js Simply put a dot before the first (./) of the relative URL . Happy New Year Everybody! ![]() |
Last Edit: 4 weeks 8 hours ago by Chacapamac.
The topic has been locked.
|
|
Hello.
I suggest use Custom JS Files field to load JS file. With this example. templates/astroid_template_one/js/filename.js Happy New Year Thanks, Chandan |
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it. To know more about products check out the their documentation.
The topic has been locked.
|
|
Thanks “chandandeep” !
Yep, both work, even on local Mamp installation without using Virtual hosts. Do you think one method is better than the other ? ./templates/astroid_template_one..... or directly templates/astroid_template_one |
The topic has been locked.
|
|
Use without dot.
|
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it. To know more about products check out the their documentation.
The topic has been locked.
The following user(s) said Thank You: Chacapamac
|
|
Thanks You,
Without dot work perfectly, my way now! ![]() Suggestion: maybe you can add that to your documentation when entering Custom Code in the Template manager and Joomla menus Astroid options Will help people that prefer a local URL and work on local environment first. |
The topic has been locked.
|
|
We already did this. Please check this out. We never said use dot with path.
docs.joomdev.com/article/astroid-custom-js/ Happy New Year |
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it. To know more about products check out the their documentation.
The topic has been locked.
|
|
You absolutely right, I didn’t read everything, it’s clear
Happy New Year Joomdev — I’m happy to have chosen Astroid |
The topic has been locked.
|
|
Hey,
Happy New Year! Considering the problem solved, topic shall now be closed. Thanks, Nishtha |
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it. To know more about products check out the their documentation.
The topic has been locked.
|
JoomDev is not affiliated with or endorsed by Open Source Matters or the Joomla! Project. The Joomla! logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
Powered by Astroid Framework © 2021 JoomDev. All Rights Reserved.