-
☆ A M B ☆
- 2,213 Posts
It looks like you would use:
$basePath = $modx->getOption(’base_path’);
You might also want to have a look at MetaX as I think that function is used in one or two places...
Oh. That’s not in the list I looked at. Where did you find that? And thanks!
-
☆ A M B ☆
- 2,213 Posts
It’s simply a modification (/guess) based on the code sample on the page linked. If you want to dig into things further you may want to look into:
http://rtfm.modx.com/display/revolution21/Developing+an+Extra+in+MODX+Revolution
Keep in mind some legacy code currently in 2.0.x will be removed in 2.1.x (the next release), so I would look in the Revolution 2.1 documentation area.
Hope that helps.
$modx->getOption(’base_path’) is definitely what you want.
getOption() is the correct method for getting any System Setting.
-
☆ A M B ☆
- 2,213 Posts
The API documentation (
http://api.modxcms.com/) might be a good place to look.
Most of them are in System -> System Settings. Here’s a partial, unofficial list of the ones that aren’t in the System Settings grid:
[table]
[tr][td]Setting[/td][td]Tag[/td][/tr]
[tr][td]Site URL[/td][td][[++site_url]][/td][/tr]
[tr][td]Base Path[/td][td][[++base_path]][/td][/tr]
[tr][td]Base URL[/td][td][[++base_url]][/td][/tr]
[tr][td]Core path[/td][td][[++core_path]][/td][/tr]
[tr][td]Manager Path[/td][td][[++manager_path]][/td][/tr]
[tr][td]Manager URL[/td][td][[++manager_url]][/td][/tr]
[tr][td]Processors path[/td][td][[++processors_path]][/td][/tr]
[tr][td]Assets path[/td][td][[++assets_path]][/td][/tr]
[tr][td]Assets URL [/td][td][[++assets_url]][/td][/tr]
[tr][td]Connectors path[/td][td][[++connectors_path]][/td][/tr]
[tr][td]Connectors URL[/td][td][[++connectors_url]][/td][/tr]
[tr][td]URL Scheme[/td] [td][[++url_scheme]][/td][/tr]
[tr][td]HTTP Host[/td][td][[++http_host]][/td][/tr]
[/table]