Beispiel #1
0
        /// <summary>
        /// Adds a segment to the title and returns all segments.
        /// </summary>
        /// <param name="segment">The segment to add to the title.</param>
        /// <param name="position">Optional. The position of the segment in the title.</param>
        /// <param name="separator">The html string that should separate all segments.</param>
        /// <returns>And <see cref="IHtmlContent"/> instance representing the full title.</returns>
        public IHtmlContent RenderTitleSegments(string segment, string position = "0", IHtmlContent separator = null)
        {
            if (!String.IsNullOrEmpty(segment))
            {
                Title.AddSegment(new HtmlString(HtmlEncoder.Encode(segment)), position);
            }

            return(Title.GenerateTitle(separator));
        }
        public string RenderTitleSegments(string segment = "", string position = "0")
        {
            if (!String.IsNullOrWhiteSpace(segment))
            {
                Title.AddSegment(segment, position);
            }

            return(Title.GenerateTitle());
        }
Beispiel #3
0
 /// <summary>
 /// Adds a segment to the title and returns all segments.
 /// </summary>
 /// <param name="segment">The segment to add to the title.</param>
 /// <param name="position">Optional. The position of the segment in the title.</param>
 /// <param name="separator">The html string that should separate all segments.</param>
 /// <returns>And <see cref="IHtmlContent"/> instance representing the full title.</returns>
 public IHtmlContent RenderTitleSegments(IHtmlContent segment, string position = "0", IHtmlContent separator = null)
 {
     Title.AddSegment(segment, position);
     return(Title.GenerateTitle(separator));
 }
Beispiel #4
0
 /// <summary>
 /// Adds a segment to the title and returns all segments.
 /// </summary>
 /// <param name="segment">The segment to add to the title.</param>
 /// <param name="position">Optional. The position of the segment in the title.</param>
 /// <returns>And <see cref="IHtmlContent"/> instance representing the full title.</returns>
 public IHtmlContent RenderTitleSegments(IHtmlContent segment, string position = "0")
 {
     Title.AddSegment(segment);
     return(RenderTitleSegments());
 }