Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • James King 11 posts 20 karma points
    Jul 08, 2009 @ 02:31
    James King
    0

    Xslt content and asp.net?

    Hi guys,

    Just got Umbraco installed on my shared host and it seems very, very nice. I was wondering which file I have to reference to find the umbraco.library in Visual Studio 2008 as I want to be able to show the content on Umbraco on my .aspx pages that have already been created, do not want to transfer them to umbraco templates. I believe it's known as the GetXMLNodeByID or something? I actually still learning asp.net so if anyone could direct me to a tutorial on how to achieve saving the content into the xml or xslt file and referencing te right dll? to insert the getbyid control? It would be great thanks..

    Relatively new to all of this after working with html and just finished teaching myself css so I don't know many technical terms so keep it as simple as possible please! :)

  • skiltz 501 posts 701 karma points
    Jul 08, 2009 @ 05:17
    skiltz
    0

    Did you mean you want to show the content of your .aspx inside Umbraco?  In the root Umbraco directory there is a directory called Bin all the DLL's to needed to get access to the Umbraco Library.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 08, 2009 @ 05:18
    Aaron Powell
    0

    I'm not sure I'm following what you're trying to achieve, do you want to display some content from an Umbraco node on a page?

    If so you should look into the Node class within the umbraco.presentation.nodeFactory namespace. Peter shows how to create a basic control which renders out some properties of a Node in a UserControl in this post: http://our.umbraco.org/forum/developers/api-questions/2763-List-all-child-nodes-using-API

  • Chris Dunn 75 posts 127 karma points
    Jul 08, 2009 @ 05:29
    Chris Dunn
    0

    The library is found in the umbraco.dll assembly.  There is a function GetXmlNodeById(string id) which takes the id of the node to display and returns the node as xml.  But slace is right that you should look at the nodefactory which i believe is faster, especially if retrieving a series of nodes, children or ancestors.  If the pages exist outside of the umbraco application directory you might look at webservices.

  • James King 11 posts 20 karma points
    Jul 08, 2009 @ 18:56
    James King
    0

    Thanks guys I will check out that tutorial and will let you know if I need any further help (if you don't mind!)

  • James King 11 posts 20 karma points
    Jul 08, 2009 @ 18:58
    James King
    0

    Can't find an edit button but to clarify:

    I just want to be able to extract the text from content pages within UMbraco and display them on the .aspx page.

     

    Thanks

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 08, 2009 @ 20:16
    Dirk De Grave
    0

    Hi James,

    Have a look at this wiki page. It shows how to get data from a content page using the nodeFactory class.

     

    Hope this helps.

    Regards,

    /Dirk

  • Chris Dunn 75 posts 127 karma points
    Jul 08, 2009 @ 21:09
    Chris Dunn
    0

    James,

    So just to clarify....are you looking to 'extract' a document (content) from Umbraco, and save to an aspx page as a static file, or are you looking to displaying a document's content dynamically?    I get the impression you are trying to using the editor to create/edit content using umbraco, then extract that data , perhapes on publish to create static pages?  Let me know if I'm on the right track.

    What are your reasons for not wanting to present the content (templates and documents) using the umbraco presentation layer (front-end)?  I would suggest taking a full look at Umbraco's complete functionality to see if in the end it wouldn't be more effecient to use umbraco completely rather than the blend, It might be more work upfront to migrate the content, but less maintainence in the long term.  If I'm missing a piece of this let me know.

    -Chris

     

  • James King 11 posts 20 karma points
    Jul 08, 2009 @ 22:54
    James King
    0

    @Dirk
    Thanks Dirk. I will check out the webpage you mentioned.

    @Chris
    You're pretty much bang on target there. Clients would log into Umbraco, select the page they wish to edit (or add) and when they save then that text data would be taken from Umbraco and generated as static text I guess on the .aspx pages.

    I may be interested in the second option. I could build a test website to try out Umbraco's full features and see how I get on with it. Could you explain (or point me in the right direction) what is this presentation later (front-end) stuff? Would be quite willing to migrate over if it's worth it in the long run,

    Thanks all for the responses. Was not expecting so many! Really appreciated. This content stuff has been bugging me for a whole week!

  • Chris Dunn 75 posts 127 karma points
    Jul 08, 2009 @ 23:06
    Chris Dunn
    0

    James,

    By the presentation layer I just mean how Umbraco normally displays content on the front end, the display of the content to the visitors vs the admin.  So rather than extract all of the site content to static pages, just let umbraco display it as it normally does.  I think you will find a pretty open template system which uses master pages, which may be how you are doing things now.  So you might just be able to copy the template code from existing master page, right into the umbraco templates.  The just replace your hard coded page title, body text with the page fields you define in your document types.

    It might be worth getting a subscription to umbraco.tv which is only about 19 EURO a month.  It should give you some great walkthroughs of how to get things done.  

  • James King 11 posts 20 karma points
    Jul 08, 2009 @ 23:13
    James King
    0

    Thanks for the quick response Chris. I think I will check it out.

  • James King 11 posts 20 karma points
    Jul 08, 2009 @ 23:51
    James King
    0

    @Dirk
    Hi Dirk. I am still new to asp.net so I put that code from the wikipage in the code behind of default.aspx and i have a literal control with the id "defaultContent" would I then have to assign the node code to the literal to display it or am I doing something wrong? If that is the case could you show me a snippet so I can understand what to do? Thanks

    (Sorry if it's very noob question as I said before I am self learning all of this stuff! :-) )

Please Sign in or register to post replies

Write your reply to:

Draft