Other Snippets questions

Snippets & Sorcerer issues

David Hillock's Avatar David Hillock
I have a snippet, called LoadFirstName, with this code
<?PHP $customFields = FieldsHelper::getFields('com_users.user', JFactory::getUser(), true); 
echo $customFields[4]->value . ',';?>

In an article I put this, and it works: {snippet title="LoadFirstName"}

I created a custom HTML component, and in the module area, I added this: {snippet title="LoadFirstName"}

Instead of displaying the first name, it displays the code in my snippet. I tried putting source tags around the snippet, but that did not work - like this: {source}{snippet title="LoadFirstName"}{/source}

If I put the source from the snippet directly in into the component, it does work. However, it would be great to have the php code a snippet.

Any suggestions. Thank you
Peter van Westen's Avatar Peter van Westen ADMIN
It is probably due to the system plugin ordering. Try changing the ordering of the plugins in question.

You say "custom HTML component", but I assume you mean "custom HTML module".
If the ordering doesn't;t work, switch on the "Prepare Content" option in the module.
Please post a rating at the Joomla! Extensions Directory
David Hillock's Avatar David Hillock
Prepare option works, and sorry about that - I was referring to a custom HTML module.

Consider the option closed.

Thank you
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription