Thanks for the response! :) I can't provide an external link yet unfortunately. I was providing an example of what happens with the directory structure.
So here is snippet of my NewsItem page which lives under NewsOverview:
@inherits UmbracoTemplatePage@{Layout="Master.cshtml";// If the editor has not explicitly provided the "Page title" property page // then just show the name of the page otherwise show the provided titlevarpageTitle=string.IsNullOrWhiteSpace(CurrentPage.Title)?CurrentPage.Name:CurrentPage.Title;}<linkhref="@Url.Content("~/~/css/style-news.css")"rel="stylesheet"type="text/css"media="all"/>
News Overview:
@inherits UmbracoTemplatePage@{Layout="Master.cshtml";// If the editor has not explicitly provided the "Page title" property page // then just show the name of the page otherwise show the provided titlevarpageTitle=string.IsNullOrWhiteSpace(CurrentPage.Title)?CurrentPage.Name:CurrentPage.Title;// Model.Content is the current page that we're on// AncestorsOrSelf is all of the ancestors this page has in the tree// (1) means: go up to level 1 and stop looking for more ancestors when you get there// First() gets the first ancestor found (the home page, on level 1)varhomePage=CurrentPage.AncestorsOrSelf(1).First();// Find all pages with document type alias umbNewsOverview// We do that using the plural, umbNewsOverviews (note the extra "s" in the end)// Then take the first one, as we know there will only be on news overview pagevarnewsOverview=homePage.umbNewsOverviews.First();// Similar to above: find all pages with document type umbNewsItem under the news overview page// Then order them, first by publishDate (a property the editor can explicitly set on the news item)// and then by createDate, which is set by Umbraco automatically when a page gets created.varnewsItems=newsOverview.umbNewsItems.OrderBy("publishDate desc, createDate desc").Take(5);}<linkhref="@Url.Content("~/~/css/style-news.css")"rel="stylesheet"type="text/css"media="all"/>
I didn't think my CSS would affect this?
So I have a Master template file, and everything lives under that. The Master template has most of the links in it configured in the backend.
Ah I figured out what the problem was for most of the links. Very simple as usual haha. Adding a "/" before the link name so "/contact" rather than just "contact" or "contact/".
Links seem to be stacking ontop of eachother making the website unusable
Hi,
For some reason my links in my site are stacking ontop of eachother, so for example if I navigate here:
http://localhost:3489/news-overview/neo-systems/
And then hit the Home button to return the home page then Umbraco will navigate here:
http://localhost:3489/news-overview/neo-systems/home
Which goes no where as this page doesn't exist.
What could be the cause of this?
I've basically copied the news posting system from the Umbraco samples for this.
Thanks,
Jon
Hi Jon
Any chance that you can provide links that are accessible to us on www? Those above are for your local machine only :)
Perhaps a screendump and a snippet of your CSS code is enough to provide some hints though.
Looking forward to hearing from you.
/Jan
Hi Jan,
Thanks for the response! :) I can't provide an external link yet unfortunately. I was providing an example of what happens with the directory structure.
So here is snippet of my NewsItem page which lives under NewsOverview:
Ah I figured out what the problem was for most of the links. Very simple as usual haha. Adding a "/" before the link name so "/contact" rather than just "contact" or "contact/".
Thanks!
Jon
Hi Jon
Missed your post yesterday but happy to read that you managed to figure out the issue :)
/Jan
is working on a reply...