0

Currently, we are working on Kentico CMS 9.0 version. We are facing some development issue on below scenario:

There is a static message getting displayed on a Success page after Registration. This Text is written in WebPart -- > HTML Envelop section - Content after But we want to change this text dynamically as per User selects the Band category.

Example If User registers for 1-10 Band category, then text message should be displayed as “ Fees $1, 500 / two years”, or if the range of 2-20, then “Fees: $2,500 / two years” etc.

We tried with Macros on this, but not getting the exact solution. Also tried with relating the pages to get value from this Category pages. But no luck. If anyone has any pointers on this. Or whether it could be possible to do this in Kentico CMS, please let us know ASAP.

Simply007
  • 444
  • 3
  • 14

1 Answers1

0

If the data the user is submitting is part of the user's record or attached to a user's ID you could do a lookup using a macro or create your own custom macro to do the work for you.

For instance, if the value the user selected is attached to the user's record and they are logged in after they register, you can use something like:

CurrentUser.GetValue("CustomFieldName")

This all depends on what the value is that you're storing. If you're storing an integer or key of some sort to another table, you'll need to get that key and do another lookup to that other table to get the actual display value. Something like this:

var userRegisteredValue = CurrentUser.GetValue("CustomFieldName");
GlobalObjects.CustomTables["CustomTableNamespace.CustomTableName"].Items.Where("ItemID = " + userRegisteredValue);
Brenden Kehren
  • 5,919
  • 16
  • 27