Richt now it's working like a normal website with a menu wich direct you to each child template.
But, i want all content on one page instead. So to see each child template i just want to scroll down the frontpage.
Before implementing it to Umbraco i had just one html file. But to make it more usable i have split the code into sections, and each section in a template.
For example:
Master page:
<body>
<title>Title</title>
<div>//Here i want content from my about page</div>
<div>//Here i want content from my services page</div>
Umbraco also comes with some pre define snippets. You can find the snippets when you create a new razor file. I would recommend to use Partial View Macro Files, the files that you can create under Scripting Files folder in the developer section uses the old razor.
Since you´re new to Umbraco I also recommend you to go the Umbraco TV and see the free videos, there you will get the basic stuff about working with Umbraco.
Get child nodes displayed in master?
I am currently making an one page website in Umbraco.
I have build the pages/templates like this:
Master
Home
Services
etc.
I want to show content from all children(home, services, etc.) on the frontpage (master).
Untill now i have managed to get propertys from the child nodes like this, shown on the frontpage:
This shows me names of every child, on the frontpage.
But how do i get all the html, and not only some propertys?
Hi N. Tuver,
You can add the markup that you want. So if you want the name of the pages to be in a list you could do something like this:
So you shall build the HTML by your self. But Umbraco has some pre defined snippet e.g list pages from CurrentPage.
/Dennis
I already got all the html in each template.
Richt now it's working like a normal website with a menu wich direct you to each child template.
But, i want all content on one page instead. So to see each child template i just want to scroll down the frontpage.
Before implementing it to Umbraco i had just one html file. But to make it more usable i have split the code into sections, and each section in a template.
For example:
Master page:
<body>
<title>Title</title>
<div>//Here i want content from my about page</div>
<div>//Here i want content from my services page</div>
</body>
about page:
<p>This is the about page</p>
Hi N. Tuver,
Okay then I would recommend you to create a marco so you can place it on the master template, then it will go again on all pages.
Here is the documentation how to create macros, so you can use the code on different pages. http://our.umbraco.org/documentation/reference/templating/macros/managing-macros
Umbraco also comes with some pre define snippets. You can find the snippets when you create a new razor file. I would recommend to use Partial View Macro Files, the files that you can create under Scripting Files folder in the developer section uses the old razor.
Since you´re new to Umbraco I also recommend you to go the Umbraco TV and see the free videos, there you will get the basic stuff about working with Umbraco.
Hope this helps,
/Dennis
That seems to work perfectly!
Thank you for helping..
is working on a reply...