[SOLVED] Is it possible to show the alias in Items List?

More
9 years 8 months ago - 9 years 8 months ago #53653 by pipedream
Hi, I'm using FC v3 BETA5a in Joomla 3.4.1.

I tried to add the "alias" in the Custom Fields for Items List field of the Configuration, but nothing changes.

Please let me know if is it possible to show the alias in the Items List, thank you.
Last edit: 9 years 8 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago - 9 years 8 months ago #53654 by ggppdk
Test this:
Edit field: plugins/flexicontent_fields/coreprops/coreprops.php
and replace fucntion: onDisplayFieldValue
with:
Code:
// Method to create field's HTML display for frontend views public function onDisplayFieldValue(&$field, $item, $values=null, $prop='display') { if ( !in_array($field->field_type, self::$field_types) ) return; static $all_langs = null; $props_type = $field->parameters->get('props_type'); if ($props_type == 'language') { if ($all_langs===null) { $all_langs= FLEXIUtilities::getLanguages($hash='code'); } $lang_data = $all_langs->{$item->language}; $field->{$prop} = @$lang_data->title_native ? $lang_data->title_native : $lang_data->name; } else if ($props_type == 'alias') { $field->{$prop} = $item->alias; } }

then Create a CORE property field with type "ALIAS", assign it to the desired content types, and place it in a field position of the appropriate CATEGORY Layout

(we will commit change for v3 BETA6)

A shorter solutions is to do inside your template:
Code:
echo $item->alias;


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 9 years 8 months ago by ggppdk.
The following user(s) said Thank You: pipedream

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago - 9 years 8 months ago #53657 by pipedream
Problem solved.

ggppdk wrote: ... and place it in a field position of the appropriate CATEGORY Layout

(we will commit change for v3 BETA6)

A shorter solutions is to do inside your template:

Code:
echo $item->alias;


I just wanted it to be listed in the backoffice, so adding "alias" to the Custom Fields for Items List field in the Configuration was enough for me. ;)

Thank you.
Last edit: 9 years 8 months ago by pipedream.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.329 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline