-
☆ A M B ☆
- 24,524 Posts
It should (except for the missing ; on your return directive). Did you try it?
Hi,
Yes I spotted that after posting but I still got an Error 500 and in the error log I got this
[2012-10-09 06:58:30] (ERROR @ /stage/index.php) Could not load class: site_tmplvars from mysql.site_tmplvars.
[2012-10-09 06:58:30] (ERROR @ /stage/index.php) site_tmplvars::load() is not a valid static method.
Thanks
-
☆ A M B ☆
- 24,524 Posts
Ok, here you go...
http://rtfm.modx.com/display/revolution20/Accessing+Template+Variable+Values+via+the+API
@EVAL $page = $modx->getObject('modResource', 1);return $page->getTVValue('testing');
First get the resource whose value you want, then get the TV value from that page for the TV name.
-
☆ A M B ☆
- 24,524 Posts
You could also use
@SELECT value FROM modx_site_tmplvar_contentvalues WHERE tmplvarid = 40 AND contentid = 1
Thanks for the reply. The first option works a treat on localhost but on Windows IIS server still causes a 500 error but strangely nothing in the MODX error log.
-
☆ A M B ☆
- 24,524 Posts
Well, I don't know anything at all about IIS.
Hello, is that possible in modx evolution?
How to do?
Quote from: toucas at May 08, 2013, 06:46 PMHello, is that possible in modx evolution?
How to do?
This should get you going in the right direction
http://wiki.modxcms.com/index.php/API:getTemplateVarOutput