Current breadcrumbs setup. This works great to pull in my breadcrums, but I need to show a primary domain on certain sites. So basically would be something like
If the site url is Primary.com show it in the breadcrumbs else do the below code. Is this possible and does it make sense. lol
Maybe a screenshot of your actual site tree would be helpful to visualise the issue. Also maybe mock up a breadcrumb to describe what you want under each domain?
I am thinking I cannot share the screenshot because of confidentiality.
Let me try to rephrase my question.
How would I do an if/else condition. Where if on google.com do this else just do this
This is not correct syntax below. I just dropped in for the if/else statement.
@if (google.com)
{
<li><a href="/">google.com</a></li>
foreach (var page in Model.Ancestors().Where("Level > 1"))
{
<li><a href="@page.Url">@page.Name</a></li>
}
}
Else <!-- This would be my other sites that are not in the root of google.com.... -->
foreach (var page in Model.Ancestors().Where("Visible"))
{
<li><a href="@page.Url">@page.Name</a></li>
}
Again the above is way off on syntax but I hope it will show what I am trying to do .
Breadcrumbs
Current breadcrumbs setup. This works great to pull in my breadcrums, but I need to show a primary domain on certain sites. So basically would be something like
If the site url is Primary.com show it in the breadcrumbs else do the below code. Is this possible and does it make sense. lol
Can you check
Request.Url.AbsoluteUri
for primary.com? I'm not 100% sure what you're asking.Do certain pages only need to show on a certain domain? Or do you need to show the domain in the breadcrumbs?
I'd make this an option on a (base) content type rather than basing it on the requested URL.
Then you could do something like this:
Nathan, I like this way, but when I put that in place I get this error:
Saving scripting file failed: e:\inetpub\wwwroot......(16): error CS1026: ) expected
So my content tree starts with folders. Each folder is a site with a primary domain.
But one folder is a site then we have 3 other sites housed under it.
Does this make sense?
Hi Michael
Maybe a screenshot of your actual site tree would be helpful to visualise the issue. Also maybe mock up a breadcrumb to describe what you want under each domain?
Cheers, Nigel
I am thinking I cannot share the screenshot because of confidentiality.
Let me try to rephrase my question.
How would I do an if/else condition. Where if on google.com do this else just do this
This is not correct syntax below. I just dropped in for the if/else statement.
Again the above is way off on syntax but I hope it will show what I am trying to do .
is working on a reply...