Using Title for Search Engines as Link Text

Posted by Community Admin on 03-Aug-2018 16:27

Using Title for Search Engines as Link Text

All Replies

Posted by Community Admin on 30-Jan-2012 00:00

Hi

Is it possible to Use the "Title for Search engines" property of a page so that I can display it as the text for the page link on my Master Page. I am currently using the following code:

<asp:Repeater id="rpChildPages" runat="server">
    <HeaderTemplate>
        <ul id="primaryNav">
    </HeaderTemplate>
    <ItemTemplate>     
        <li>
            <asp:HyperLink ID="navlink" runat="server" CssClass="nodeLink" NavigateUrl='<%#((PageNode)Container.DataItem).GetFullUrl() %>'
                Text='<%# Eval("Title") %>'>
            </asp:HyperLink>
        </li>                       
    </ItemTemplate>
    <FooterTemplate>
        </ul>
    </FooterTemplate>
</asp:Repeater>

However, am not sure what the property is for the "Title for Search Engines" which I have altered to contain text for the Url. The title only displays the Page Url.

Thanks

Posted by Community Admin on 30-Jan-2012 00:00

Hi,

I believe there is TitleHtml or HtmlTitle property on the page node. This is what we've been setting to create page nodes programmatically. 

Posted by Community Admin on 03-Feb-2012 00:00

Hello,

You can access the field by getting Page.Htmltitle property. Please review the code snippet which gets all pages with that particular title.

App.WorkWith().Pages()
               .Where(p => p.Page.HtmlTitle == "titleforsearchengines")
               .Get();

Please let us know if you have anymore questions or concerns.

All the best,
Grace Hallwachs
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 11-Sep-2014 00:00

This is a post on how to get the title for search engines, not how to search by it. :(

Posted by Community Admin on 11-Sep-2014 00:00

Yup. Nice'en e.z. Just like SF. Could this be simplified or optimized?

var currentPageNode = SiteMapBase.GetActualCurrentNode();

            IQueryable<PageNode> pageNodes = App.WorkWith().Pages()
                           .Where(p => p.Id == currentPageNode.Id)
                           .Get();
            foreach (var pageNode in pageNodes)
           
                var t = pageNode.Page.HtmlTitle;
           


Posted by Community Admin on 16-Sep-2014 00:00

Hello Richard,

As mentioned in this forum thread:Title for search engines - simple question, here is a shorter way to get html title of the current page:

var CurrentPageId = SiteMapBase.GetActualCurrentNode().Id;
var HtmlTitle = PageManager.GetManager().GetPageNode(CurrentPageId).Page.HtmlTitle;

Hope this helps.

Regards,
Vassil Vassilev
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed