StorytellerDocGen.Transformation.LinkToTransformHandler.transformFromTopic C# (CSharp) Method

transformFromTopic() private method

private transformFromTopic ( Topic current, Topic other, string props ) : string
current StorytellerDocGen.Topics.Topic
other StorytellerDocGen.Topics.Topic
props string
return string
        private string transformFromTopic(Topic current, Topic other, string[] props)
        {
            var url = _urls.ToUrl(current, other);

            var title = other.Title;
            var template = Template;

            for (int i = 1; i < props.Length; i++)
            {
                if (props[i].StartsWith("title=", StringComparison.Ordinal))
                {
                    title = props[i].Split('=').Last().Trim();
                }
                else
                {
                    template = props[i];
                }
            }

            return template.Replace("{href}", url).Replace("{title}", title);
        }