Copied to clipboard

Flag this post as spam?

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


  • Omer Javed 5 posts 25 karma points
    Jun 20, 2014 @ 08:56
    Omer Javed
    0

    Translating html design into document types and templates

    Hello,

    I am new to umbraco development and I have a basic query. I have received the design of my home page from the graphics designer in the form of html. Please tell what is the expert recommendation about creating document types and templates. Should there be one document type per page in the website? What is the criteria where we could have more than one doc types for a single page may be for re-usability? I am a bit confused as i start translating the html design into umbraco. Please provide guidance.

    Many Thanks,
    Omer Javed

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Jun 20, 2014 @ 09:11
    Dennis Aaen
    1

    Hi Omer and welcome to our,

    I would try to answser your questions the best I can. The way I usually do it is by first create a master document type and template. On the master document type I creates all the common fields that you have on every page. Such as heading. page content. SEO fields, and fields for navigation title and the opportunity to hide pages from navigations.

    On the master template I will place all the common HTML, such as header footer and so on. So to your question about  if you shoud create document types for a single page. I would say that you should create document types for each unique page. It could be a textpage newslist overview, news item and so on.

    Since you´re new to Umbraco I would recommend you to take a look at these great videos tutorials, they are showing the basic concepts working with Umbraco..http://umbraco.tv/videos/umbraco-v7/implementor/

    There you can see videos about working with document types and templates, and so on.

    If you any other questions related to this just ask again. Or if you have questions on other parts of Umbraco then just create a new topic on Our.

    Hope this helps,

    /Dennis

  • Omer Javed 5 posts 25 karma points
    Jun 20, 2014 @ 09:15
    Omer Javed
    0

    Hello Dennis,

    Thanks for your reply. Please can you also address my following question.

    What is the criteria where we could have more than one doc types for a single page may be for re-usability?What is the criteria where we could have more than one doc types for a single page may be for re-usability?

    Thanks,

    Omer Javed

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Jun 20, 2014 @ 09:19
    Jeavon Leopold
    1

    There is also a excellent step by step tutorial on doing exactly this here

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Jun 20, 2014 @ 09:24
    Dennis Aaen
    0

    Hi Omer,

    I not sure what you're asking of here sorry, But if it about that a page can have more than one document type, then no, but you can inherit from document types, so you only have to add the properties one time.

    Hope this was answer to your questions, or I am sorry, maybe you could try explain it in another way.

    /Dennis

  • Omer Javed 5 posts 25 karma points
    Jun 20, 2014 @ 09:35
    Omer Javed
    0

    Hello Dennis,

    Yes that answers my question. Let's say if I have a news ticker on my home page but there is a possibility of having it on other pages in future so i was thinking of making it into a document type and then reuse it.

    Regards,
    Omer

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Jun 20, 2014 @ 09:43
    Dennis Aaen
    0

    Hi Omer,

    Yes, when you creates the code to get data to the news ticker you can use partial views or partial  view  macro  files, these files then you can get macro. The macro can you insert and reuse where you want to show e.g the news ticker.

    You can find documentation for macos here:http://our.umbraco.org/documentation/reference/templating/macros/

    Hope this helps, and answer your question.

    /Dennis

  • Omer Javed 5 posts 25 karma points
    Jun 20, 2014 @ 09:49
    Omer Javed
    0

    Hello Dennis,

    Great thanks. I think now i get the conceptual difference between using document types and partial views and partial macros.

    Thanks ,
    Omer

Please Sign in or register to post replies

Write your reply to:

Draft