When are you seing this link? On the web page or in the editorial interface? If it's on the web page, how do you render the property?
Hi,
Its visible on the webpage.
Model
/// <summary>
/// Gets or sets the main body.
/// </summary>
/// <value>
/// The main body.
/// </value>
[CultureSpecific]
[Editable(true)]
[Display(
Name = "Main body",
Description = "Main body content shown in the main content area of the page.",
GroupName = SystemTabNames.Content,
Order = 200)]
public virtual XhtmlString MainBody { get; set; }
.aspx
<Web:BoundProperty ID="MainContentBoundProperty" runat="server" />
aspx.cs
this.MainContentBoundProperty.SetProperty<ContentPage>(page => page.MainBody);
Hi again!
BoundProperty is not anything I recognize but I can give a guess of what's probably happening. When you use web forms, there is currently three different modes for links:
The format you are seeing is the classic link which for a long time, was the public format for EPiServer. When we introduced friendly links (that represents the structure of the site), we did this by introducing a rewrite filter. The reason for this was to make it possible to upgrade existing sites and just apply the filter. This is still the case for sites built with web forms. To solve this, make sure that you have the following module under system.webServer:
<add name="UrlRewriteModule" type="EPiServer.Web.RoutingUrlRewriteModule, EPiServer" preCondition="managedHandler" />
I can mention that we are finally removing the classic links with the upcoming release of EPiServer CMS 8, since they generally make no sense any more but you still have to apply the rewrite filter to get public links.
Hi,
Thanks for that, appying that module makes all the pages disappear? Nothing is showing on the website, not even in view source?
Hmm, that sounds strange. The HTML filter will parse the HTML of the site and then replace any links. Could you remove the filter and validate the the HTML you produce does not have any serious faults in it? I think that the DTD for the parsing is pretty accepting, but if might fail if you have major faults. Also, the DTD is using a HTML 4 like syntax, so I'm not sure if some specific syntax accepted in HTML 5 might cause issues. At least, I have not heard of this being an issue.
I had the same problem in MVC; there I had to specify "RawHtml" for rendering, otherwise all urls look like you have
@Html.PropertyFor(m => m.Text, "RawHtml")
Laurens - Thanks for your reply, any ideas on how i acheive the same in WebForms?
Linus - Thanks, the HTML of the site is fine with no issues or major faults. Anything else?
Thanks
Steve
@Stephen: Actually I have no idea why you are getting an empty page if the HTML is correct. If you have not already solved this and need assistance, I suggest that you open a support case.
Hi,
I've a strange issue where the links created within the TinyMCE editor arent resolving, for example:
/Views/Pages/HubPageTemplate.aspx?id=71&epslanguage=en-GB
creation of the external links are fine.
Any one have any thoughts into why this would be happening?
Thanks
Steve