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!

Type: Discussion
Status: Resolved
buurvrouw
View Replies:
WillemAnchor replied on at Permalink Reply
WillemAnchor
I'll have an update that will fix the user attribs soon.
Page Selector attrib is not a user attrib, but i'll have a look what i can do.
WillemAnchor replied on at Permalink Reply
WillemAnchor
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.
WillemAnchor replied on at Permalink Reply
WillemAnchor
The Page Selector needs a getDisplayValue() function in it's controller.

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;
   }

concrete5 Environment Information

.

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.