Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Webparts in Transformations and CSS View modes: 
User avatar
Member
Member
bryanallott - 12/23/2013 2:36:05 AM
   
Webparts in Transformations and CSS
I have a webpart with some defined CSS; when dropping the webpart control onto a document, the CSS pulls through neatly.

When I include that same webpart through a transformation with the @Register directive, the CSS doesn't automatically get pulled into the document- which makes sense in a way I guess.

How do I (if indeed possible via the API) register/invoke the webpart so that it's CSS gets pulled into the page when registered in a transformation?

User avatar
Kentico Support
Kentico Support
kentico_janh - 12/23/2013 6:44:34 AM
   
RE:Webparts in Transformations and CSS
Hello,

You can for instance register the Head HTML code web part as well and link proper web part stylesheet using the webpart ID:

<link href="~/CMSPages/GetResource.ashx?_webparts=1262" type="text/css" rel="stylesheet" /> 


Where 1262 is the ID of a web part.

Best regards,
Jan Hermann

User avatar
Member
Member
bryanallott - 12/23/2013 7:19:08 AM
   
RE:Webparts in Transformations and CSS
mm.. interesting idea. not "clean" but an option at least :)
thank you, Jan.