Is it possible to add an HTML link on the Contact Management page?

Kentico Dev asked on December 2, 2019 16:21

I have a macro that generates a link for a contact page. Is it possible to include that link on this page in admin? Ideally in the areas highlighted in yellow. But even in the left hand menu options would work to. The only input that my macro needs is the contact email, so that would also need to be available.

Image Text

Correct Answer

Peter Mogilnitski answered on December 3, 2019 16:41

You have create extender and assign it to your Contacts page. Try it. Google example how to add column to unigird etc.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Peter Mogilnitski answered on December 2, 2019 18:23 (last edited on December 2, 2019 18:23)

The contact profile page is an Angular App located in \CMS\CMSScripts\CMSModules\CMS.ContactManagement\ContactProfile\. So in theory you can go and modify card.component.html (it is not recommended modifying Kentico code) :

<div class="header-actions-container">
    <a ng-href="{{::$ctrl.contact.EditUrl}}" class="btn btn-primary">{$ contactmanagement.contact.editcontact $}</a>
    <!-- put you link button here -->
</div>

<div class="head-section">
    <h3 ng-bind="::$ctrl.contactCard.ContactName"></h3>
    <cms-card-address ng-if="::$ctrl.showContactAddress" contact-card="::$ctrl.contactCard"/>
</div>

And then build a bundle, etc. But again you are touching the Kentico internal code. That might create problems with upgrades etc. Honestly I would contact Kentico support with this question.

1 votesVote for this answer Mark as a Correct answer

Kentico Dev answered on December 2, 2019 18:35

I see, then I'd rather no go in there and messing with the Kentico code.

Do I have any other options, then? Is something like creating a custom module the only other way?

0 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on December 2, 2019 20:34

There are options, but I don't really know the context. If could elaborate a bit on what you trying to achieve? P.S. You could probably do it on the level before ie.e with unigrid where you see list of contacts. Would that work for you?

0 votesVote for this answer Mark as a Correct answer

Kentico Dev answered on December 2, 2019 20:47

I have a url that I want to display as a link next to a contact's record.

And yes, placing it as another column on the previous pages unigrid would be perfect. so right now it shows First name, Last name, Email address, etc.

Is it possible to add a custom column there with a hyperlink that gets its URL from a macro?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.