/// <summary> /// Gets the permalink of a post based on the <see cref="SiteConfig.EnableTitlePermaLink"/>. /// Does not return the <see cref="Entry.CompressedTitle"/> of an <see cref="EntryIdCacheEntry"/>. /// </summary> public static string GetPermaLinkUrl( SiteConfig siteConfig, EntryIdCacheEntry e ) { if (siteConfig.EnableTitlePermaLink) { string compressedTitle = (siteConfig.EnableTitlePermaLinkUnique) ? e.CompressedTitleUnique : e.CompressedTitle; if (siteConfig.EnableTitlePermaLinkSpaces == false) { return GetCompressedTitleUrl(siteConfig, compressedTitle.Replace("+", "")); } return GetCompressedTitleUrl(siteConfig, compressedTitle); } else { return LinkRewriter(siteConfig, RelativeToRoot(siteConfig, "PermaLink.aspx?guid="+e.EntryId)); } }
/// <summary> /// Gets the permalink of a post based on the <see cref="SiteConfig.EnableTitlePermaLink"/>. /// Does not return the <see cref="Entry.CompressedTitle"/> of an <see cref="EntryIdCacheEntry"/>. /// </summary> public static string GetPermaLinkUrl( SiteConfig siteConfig, EntryIdCacheEntry e ) { return SiteUtilities.GetPermaLinkUrl(siteConfig,e); }
public static string GetPermaLinkUrl( SiteConfig siteConfig, EntryIdCacheEntry e ) { return GetPermaLinkUrl(siteConfig, ((ITitledEntry) e)); }