Forum Discussion

darrenSP's avatar
darrenSP
Mentor
8 years ago

Private Notes Page - Custom notes tab/Contacts list

Hi,

 

I am customising the Private notes page but can't seem to find the "tabs" component that has the links for Inbox/Sent/Friends/Ignored. To Get around this I recreated my own and hid the normal one with CSS.

 

The problem is, when I go to Contacts (Friends) tab, I can't find where the components are in studio so I can't add my own links/Customise the page.

 

Anyone any ideas?

4 Replies

  • darrenSP- There is no OOB component in studio for the user contacts list. You will need to create a new custom component for this.

    You can use below API call for fetching the contacts.

    http://community.lithium.com/community-name/restapi/vc/users/id/[id]/addressbook/contacts/friends

    Here is the documentation for this https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv1&leaf-id=Contacts.friends#Contacts.friends.

     

     

     

     

  • darrenSP's avatar
    darrenSP
    Mentor
    8 years ago

    Thanks for reply.

     

    Where do I add this new component though? I can't find the page to do add too as my custom component disappears.

     

    A way in which I think it could be done is to hide the contact list, and add the new component to the Private Notes Page (under tabs which contains all the notes components and Link list) and within the new component have a check that says:

    IF (tab == contacts) {
      Show contacts list with pagination
    } END IF

    Any thoughts?

  • TariqHussain's avatar
    TariqHussain
    Boss
    8 years ago

    darrenSP  - There is no context object to check in which tab you are. However, this can be achieved using URL.  The URL contains the tab name, you can get the current page URL using  http.request.url and check if it contains the contacts.  Similarly, you can check for other tabs as well. 

     

    <#assign url = http.request.url />

    <#if url ?contains('contacts')>
    <!-- add contact custom component -->

    <#else url ?contains('outbox')>

    <!-- add custom outbox component -->
    </#if>

  • darrenSP's avatar
    darrenSP
    Mentor
    8 years ago

    We have a custom component that uses regex to get things from the URL so will use that with an IF statement to add in the component.

     

    Thanks for your help.