dynamic path

Be informed that this forum is not an official support forum for Joomla! 4.0. Any issues regarding Joomla! 4.0 must be reported at https://issues.joomla.org/.

Joomla 4.0 is still in Beta stage. This forum should be used for sharing information about Joomla! 4.0.

Moderator: ooffick

Forum rules
Locked
giusebos
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Nov 06, 2008 7:02 pm
Location: Italy

dynamic path

Post by giusebos » Thu Sep 23, 2021 9:01 am

Hi
i have a variable with this path

Code: Select all

$wa->registerAndUseScript('metismenu', 'templates/caterpillar/js/menu-metismenu.min.js', [], ['defer' => true], ['metismenujs']);
I would like the "caterpillar" folder to become "my_template_name" dynamically
how can I do?
Last edited by toivo on Thu Sep 23, 2021 10:04 am, edited 1 time in total.
Reason: mod note: moved from 4.x General Questions

SharkyKZ
Joomla! Ace
Joomla! Ace
Posts: 1994
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: dynamic path

Post by SharkyKZ » Thu Sep 23, 2021 12:37 pm

If this is inside template files, use $this->template.

giusebos
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Nov 06, 2008 7:02 pm
Location: Italy

Re: dynamic path

Post by giusebos » Thu Sep 23, 2021 2:03 pm

i am not php/mvc expert, i don't know how to do it


Locked

Return to “Joomla! 4 Related”