Search
Other Sourcerer questions
Forum

Catch Custom field value of current item

Stephan Herby's Avatar Stephan Herby
Hi,
I have a custom field for birth, a date value, in Joomla Article about people.
Let's call it "people_birthday"
I would like to print the age of the the current people on screen.
I think I know how to calculate an age from a date value in PHP, but I don't know how to catch the custom field value with Sourcerer.
Any advice ?
Thanks in advance.
Peter van Westen's Avatar Peter van Westen ADMIN
Not really a Sourcerer question. This is just a Joomla PHP question.
A simple Google for "joomla get custom field value in php" reveals a lot.
Otherwise ask on forum.joomla.org/

If you are using Sourcerer inside the article itself, you already have access to the $article object.

To see what data it contains you can do something like:
{source}
echo "\n\n<pre>===============================\n";
print_r($article);
echo "\n==========================</pre>\n\n";
exit;
{/source}
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription