mickey-invision
-
12/10/2009 6:24:23 PM
CMS Document View Webpart
I'm trying to use the Universal Document Viewer webpart in a template, and it doesn't work.
The page has the control definition:
<%@ Register src="~/CMSWebParts/Viewers/cmsdocumentviewer.ascx" tagname="DocumentViewer" tagprefix="uc2" %>
And then I am calling it as such:
<uc2:DocumentViewer ID="taxonomyViewer" runat="server" ClassNames="CUSTOM.Taxonomy" />
where CUSTOM.Taxonomy is the class name of my document.
Then in the codebehind of the document, I'm setting the path:
taxonomyViewer.Path = CMS.CMSHelper.CMSContext.CurrentPageInfo.NodeAliasPath; taxonomyViewer.TransformationName = "CUSTOM.Taxonomy.Preview";
Nothing shows - however, if I hardcode the path in the control on the aspx page as such, it works..
<uc2:DocumentViewer ID="taxonomyViewer" runat="server" ClassNames="CUSTOM.Taxonomy" Path="/Taxonomy/Hats/Baseball" TransformationName = "CUSTOM.Taxonomy.Preview" />
Why is this so?
I have to mention that integrating my own asp.net code into kentico is extremely frustruating because there is almost no documentation on how to use any of the code that comes along with the webproject.... its all by trial and error... and guessing...
|