-
- 5,888 Posts
where is the placeholder coming from?
How/where are you using this script?
If the placeholder was set with the modx-api, you get it with
$userid = $modx->getPlaceholder('id');
If you just want to echo the placeholder value, you can output the whole placeholder tag, and MODX will parse it on the next pass through the parser.
-
- 24,544 Posts
We really need more information to advise you. For example, is that placeholder in the Resource Content field, in a Template, in a chunk pulled in with another tag, in a chunk used as a Tpl Chunk by another snippet?
What is setting the placeholder value?
What do you want to use the placeholder value for?
If the user is already logged in you can use
$UserID = $modx->user->get('id');
http://bobsguides.com/revolution-objects.html