Add routing for a Promotion in the new marketing engine

Vote:
 

Hi!

Is it possible to add routing for a Promotion? Seems like there is only partial rendering by default but I would like to do something like this:

@promotion.Name

Or maybe there is another good way to solve how to display a Promotion like a page of its own?

Thanks!

/Kristoffer

#175513
Feb 22, 2017 11:57
Vote:
 

Yes, probably. If I remember correctly that was done (implementing IRoutable) by one of our devs on a hack day. 

If it doesn't work well, a possibility would be to have a ContentReference property on the promotion model where the marketer would point to a landing page for this promotion, and then use that property when rendering the "link to the promotion".

#175519
Feb 22, 2017 13:32
Vote:
 

Thanks Magnus, I will look into it. The problem I guess is that I can't get the built in promotions to use IRoutable?

I think I will build a Promotion page that just has a promotion id in the index method and then load the PromotionData and pass it to the model.

/Kristoffer

#175535
Feb 22, 2017 22:16
Vote:
 

You can try to subclass the types you want to use and implement IRoutable on them. Then you can hide the types you subclassed, see http://world.episerver.com/documentation/developer-guides/commerce/marketing/hiding-promotion-types/

#175561
Feb 23, 2017 7:31