0

I'm trying to create a custom page in web 8, to do it I'm following these steps:

  1. Create a Custom Page from Tridion
  2. Create an .aspx file in the File System (under WebUI/MyFolder)
  3. Add the following simple code

    <%@ Import Namespace="Tridion.ContentManager"%>
    <%@ Import Namespace="Tridion.ContentManager.ContentManagement"%>
    
    <%@ Page Language="C#" AutoEventWireup="false"%>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html >
        <head id="head">
        </head>
        <body class="itemview">
            <div id="StackElement" class="stack horizontal fixed">
                <% Tridion.ContentManager.ContentManagement.Component c = Tridion.ContentManager.Session.GetObject("tcm:111-11111"); %>
            </div>
        </body>
    </html>
    

But I get "The type or namespace name 'Component' does not exist in the namespace 'Tridion.ContentManager.ContentManagement' (are you missing an assembly reference?)"

Any idea what might be missing?

Thanks in advance.

1
  • Do you have the Tridion Content Manager dlls in the bin directory of your custom page's virtual directory? Commented Apr 2, 2017 at 15:47

2 Answers 2

1

I realized that the custom page you create in Tridion is just a link, so I created a complete new solution in Visual Studio using WebApi and once it worked locally I uploaded to the server and create a Custom Page (a link) to that new solution (which I moved to the server as published code).

0

Please try below mention assembly reference. i hope it will work.!!!! please try here sample example

Tridion.ContentManager;
Tridion.ContentManager.CommunicationManagement;
Tridion.ContentManager.ContentManagement;
Tridion.ContentManager.contentmanagement.Component
3
  • Same happens...
    – polonskyg
    Commented Mar 2, 2017 at 20:22
  • Creating custom page using core services? Commented Mar 2, 2017 at 21:01
  • Didn't try it, but the problem here is why Component is not being found... To use core services, I'll need more time to try it. Thx.
    – polonskyg
    Commented Mar 3, 2017 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.