CW Field Display is a simple module for displaying a Joomla custom field or fields from a specific context and item.
With CW Field Display, you can either set a specific context and item ID in the module parameters, or allow it to use the current page's context and item ID. You can also set specific fields or field groups to be displayed or allow it to display all custom fields. This module gives you greater control over how and where you display custom fields on each page because it makes it possible to display custom fields outside of the component's output.
Add a CW Field Display module to any page(s) on your site
com_users.usercontext is to be used.
Creating a Template Override
If you want to override the standard layout, you have to create a template override as follows:
The default output calls the standard layout to render all fields from
com_fields. You can override this to render each field individually by looping through the
$fields array variable that is passed to the layout. Each field in the array is a standard object, and has a "value" parameter and a "rawvalue" parameter. The "value" parameter is rendered through the field type's output layout, and the "rawvalue" parameter is the raw value entered for the field by the admin.
You may also use
FieldsHelper::render to render a single field using the following:
echo FieldsHelper::render( $context, 'field.render', array( 'field' => $field ) );
This is assuming that
$field is the variable you get when looping through the
* Note: If you want to have multiple template overrides, you can create multiple copies of
default.php, but give it different names. Each new override will be available in as an option in the Alternate Layout parameter in the Advanced parameter tab in the module.