cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EB77
Regular Visitor

showing message from an entity in portal

Hi everyone!

 

I have a custome entity in CRM, which is called "Portalnotice". It will be used to save a message or notice in a certain timeframe. 

Now I want to show the information from this entity (the notice) to all the users, who log on to the website via a pop-up.

It should be a button on this pop-up, like "seen", and everytime a user clicks on it, the information that the user has already clicked should be saved somewhere, so the message won't show up again for the same user. 

 

Do you have any idea or suggestion how can I solve this problem?

Thanks!

 

1 REPLY 1
chleverenz
Super User
Super User

Hi @EB77 ,

usually, portals use liquid inheritance to render pages. So you could modify the baseliquid, which is used for your portal (may be "layout 1 column"?) and place code in there, then the code will be available on each and every page.

The code which could be used can be a fetch to fetch the latest news which is still to be visible (so you might have validfrom/validto attributes in your table).

The "only once" feature can be set in two ways: either, you store the seen information in a cookie by javascript or you create another table or a dataattribute in the contact to save the last date, the user clicked on "i have ssen it". The save could be done via the webapi of the portal.

The cookie can be access in the request.params collection. Just make sure to set the cookie for the whole site by adding the "path=/" option to the cookie.

The last bit is the display of teh message. You can either make a div in the roorliquid and show it accordingly or simply do a window.confirm (which is really old fashioned 🙂 )

 

If you need more specific help on this idea, just ping me.

 

Hope it helps,

  Christian

 

PS it is temptimg to use the header or footer template for this functionality. I would not recommend to do so as header and footer are heavily cached which leads to not that great predictable behaviors in scripting based on data...

Helpful resources

Announcements
Carousel Community Blog

Check out the Community Blog

Read all about the most recent blogs in the community!

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Carousel News & Announcements

What's New in the Community?

Check out the latest News & Events in the community!

Users online (1,640)