attribute with multiple values
Permalink Browser Info Environment
Hi there,
I hoped this add-on was exactly what i needed, but i bump into a problem.
On a standard install of concrete5 with standard sample content, a user attribute gets generated called 'account_profile_links'. With this attribute you can attach socialmedia links to a user.
I want to display those links, but when using your add-on it displays as [object Object].
Also i made a custom attribute for a link to a personal page. This attribute is made with the Page Selector Attribute from the Marketplace installed. This link display as '208' (just text). This is probably the page ID. But i want the link to the page to display.
Can you help me getting those two attributes to work? I would very much appreciate that!
I hoped this add-on was exactly what i needed, but i bump into a problem.
On a standard install of concrete5 with standard sample content, a user attribute gets generated called 'account_profile_links'. With this attribute you can attach socialmedia links to a user.
I want to display those links, but when using your add-on it displays as [object Object].
Also i made a custom attribute for a link to a personal page. This attribute is made with the Page Selector Attribute from the Marketplace installed. This link display as '208' (just text). This is probably the page ID. But i want the link to the page to display.
Can you help me getting those two attributes to work? I would very much appreciate that!
Type: | Discussion |
---|---|
Status: | Resolved |
Version 1.1.2 is up.
The user attribs now work as they should
I also added your requested functionality to be able to show the page author's info.
I didn't include the page selector attrib.
See the version info for details.
The user attribs now work as they should
I also added your requested functionality to be able to show the page author's info.
I didn't include the page selector attrib.
See the version info for details.
The Page Selector needs a getDisplayValue() function in it's controller.
it needs: use Page; at the top.
And then something like:
it needs: use Page; at the top.
And then something like:
public function getDisplayValue() { $ps_val = $this->getValue(); $html = ''; $ps_Page = Page::getByID($ps_val); if (is_object($ps_Page)) { $url = $ps_Page->getCollectionPath(); $name = $ps_Page->getCollectionName(); $html .= '<a href="' . $url . '" title="' . $name . '">'.$name . '</a>'; } return $html; }
Page Selector attrib is not a user attrib, but i'll have a look what i can do.