Copied to clipboard

Flag this post as spam?

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

  • Anthony Decap 1 post 71 karma points
    Jan 10, 2019 @ 15:08
    Anthony Decap

    Hi ,

    This is the first time I'm going to use umbraco and I have a few questions that I can not directly find an answer to.

    I have created an website with c # code behind it. There is an SQL database connected to my code to make login and registration possible. All my content is hardcoded in the aspx page

    now here are my questions

    • Do I have to remove the hardcoded content and then replace it with Document Type Properties ? As far as my knowledge goes ... yes ?

    • The tutorial uses html pages as example and you have to copy the HTML code and paste it in umbraco. But I use with code behind my page. what do i need to do with the aspx.cs page ? Do I also have to put it in umbraco and write the remaining c# code in there ?

    I could realy use somme help hahah !

  • Alexander Croner 71 posts 282 karma points
    Jan 10, 2019 @ 15:44
    Alexander Croner

    Welcome Anthony!

    I would try to follow the tutorials by Paul Seal, search for him on youtube and theres a complete tutorial how to build a page from scratch.

    That will probably answer your questions :)

  • pbl_dk 131 posts 479 karma points
    Jan 10, 2019 @ 16:15

    Hi there I would also recommend Umbraco.TV, theres a lot of knowledge there. Thats how I personally have learned Umbraco.

  • Allan 42 posts 192 karma points
    Jan 11, 2019 @ 10:37

    Definitely go for some of the tutorials as mentioned above.

    It took me forever to understand 'Document Types' and 'Templates' and how everything works, but its second nature now and makes perfect sense. I will have a quick stab at answering your specific questions...

    Take your hard coded content (should be mainly HTML) and put it in a template (you will probably want to make a master template then inherit specific templates underneath). Now for each of those hard coded items that you want dynamic you need to create a Document Type with specific Document Type Properties to contain the new dynamic fields - the nice part is that those field properties can be all kinds of things... text strings, file uploads, content pickers, check boxes, image croppers... the list is (almost) endless!

    Now we are missing your code behind right?

    In many cases you can simply insert it into the template and say show 'this' piece of dynamic content (i.e. the specific Document Type Property you want to display), but there may be need for more complex code (loops, etc.). It is possible to write these into the template too, but if you are familiar with the code behind style of things I would suggest using razor macros that you drop into the templates wherever you need them... and of course this makes them re-usable in multiple templates.

    Now you need to wire up the template with the Document Type (using its properties tab). This gives you a 'ready to go' web page...

    But where is the website?

    OK - So the content section of Umbraco allows you to lay out all of those Document Types in a tree like structure that effectively represents your website. You can constrain certain items from being created in certain places so that eventually you could offer up this part of Umbraco to anyone that wanted to maintain the website without affecting any of the work you have done behind the scenes, etc.

    SQL - This is almost an afterthought because Umbraco does all of the SQL stuff for you! You just wire it up to the correct database and that is pretty much it!

    Really quick run down, I have probably missed stuff, but felt like having a go explaining things!

    Try installing with a basic website package added so that you can walk around and see how the site works. Once you are ready to build your own you can simply remove the unwanted items.

    Good Luck and welcome to Umbraco :-)

Please Sign in or register to post replies

Write your reply to: