Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Macros in Web Part Containers View modes: 
User avatar
Member
Member
Armysniper89 - 7/14/2011 11:16:24 PM
   
Macros in Web Part Containers
Is it possible to use Kentico's macros in a Web Part Container?

I wanted to setup a "Text Before Web Part" like this:

<h2>Emergency news <%# GetDateTime(DateTime.Now, "MM.DD.YY") %>
:</h2>
<div>
But the container returns just the words "Emergency news"...

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 7/15/2011 7:49:44 AM
   
RE:Macros in Web Part Containers
Hello,

Yes, they can. However, in your case, it's about creating a custom macro to retrive a current date in code (as far as I'm aware there is no native context macro available for this).

Please see more info here: Appendix A - Macros.

Best regards
Ondrej Vasil