Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Connie DeCinko 931 posts 1159 karma points
    Jul 30, 2010 @ 20:23
    Connie DeCinko
    0

    Purpose of SEO Tab

    In one of the many blog or forum postings, I saw reference to adding a tab to your default document type called "SEO" but I cannot seem to relocate that article to determine what properties should be on that tab.

    Can anyone clue me in as to what I should put there?  How does this differ from properties that would be on the meta tab?

     

  • Ali Sheikh Taheri 459 posts 1604 karma points c-trib
    Jul 30, 2010 @ 20:46
    Ali Sheikh Taheri
    1

    Hi

    here is the SEO tab which I create for pages that needs to have meta data tags.

    first one is for title of browser.

    <title>

                <umbraco:Item Field="metaTitle" useIfEmpty="pageName" runat="server"></umbraco:Item>

    </title>

    second and 3rd are for meta data and here is how you should use them in master page.

    <meta name="description" content="<umbraco:Item field='metaDescription' runat='server'></umbraco:Item>" />

     <meta name="keywords" content="<umbraco:Item field='metaKeywords' runat='server'></umbraco:Item>" />

    the above tags are all before <body>.

    Cheers

    Ali

  • Matt Brailsford 2279 posts 11088 karma points MVP 6x c-trib
    Jul 30, 2010 @ 22:10
    Matt Brailsford
    1

    Hey Connie,

    Mind is pretty much as per ali's, but I tend to do a little more with the page title.

    My SEO tab is the same, but I also have a tab on the homepage called "Site". On this tab, I'll have 2 textString properties, one called "Site Name" and one called "Site Description". I then use the following macro to create the page title

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [
      <!ENTITY nbsp "&#x00A0;">

    ]>
    <xsl:stylesheet
           
    version="1.0"
           
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
           
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
           
    xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
           
    exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">

     
    <xsl:output method="xml" omit-xml-declaration="yes"/>

     
    <xsl:param name="currentPage"/>

     
    <xsl:variable name="homepageNode" select="$currentPage/ancestor::root/node[@nodeTypeAlias='homePage']"/>

     
    <xsl:template match="/">
       
    <title>
         
    <xsl:choose>
           
    <xsl:when test="string-length($currentPage/data[@alias='pageTitle']) &gt; 0">
             
    <xsl:value-of select="$currentPage/data[@alias='pageTitle']"/>
           
    </xsl:when>
           
    <xsl:when test="$homepageNode/@id = $currentPage/@id">
             
    <xsl:value-of select="$homepageNode/data[@alias='siteName']"/> - <xsl:value-of select="$homepageNode/data[@alias='siteDescription']"/>
           
    </xsl:when>
           
    <xsl:otherwise>
             
    <xsl:value-of select="$currentPage/@nodeName"/> | <xsl:value-of select="$homepageNode/data[@alias='siteName']"/>
           
    </xsl:otherwise>
         
    </xsl:choose>
       
    </title>
     
    </xsl:template>

    </xsl:stylesheet>

    So this basicaly does 3 things.

    1) If the pageTitle property is filled in, just use that

    2) If you are on the homage, create a title tag as follows: Site Name - Site Description

    3) If you're on any other page, create a title as follows: Page Name | Site Name

    My meta tags use another macro, but they basicaly do the same job as Ali's example

    Matt

  • Tim 1192 posts 2653 karma points c-trib
    Aug 05, 2010 @ 13:11
    Tim
    0

    Similar to Ali and Matt, but I also have blocks in there to allow people to add google tracking code, and other PPC/Affiliate tracking code. The google code is normally a separate field, that I set on the homepage and use a recursive value on the templates, as it's the same for all pages (but they have the option to override it if they want to do anything crazy like split testing). I also have a header and footer code block that allows them to drop additional JS code into either location for page sepcific tracking.

    :)

  • Connie DeCinko 931 posts 1159 karma points
    Aug 05, 2010 @ 16:49
    Connie DeCinko
    0

    Sounds like the meta tab and SEO tab can be combined in most cases.  Not sure why the example I saw had them seperate.  Unless they wanted to be able to hide one of the tabs and only allow admins to change some properties.

     

  • Eric Boen 40 posts 64 karma points
    Aug 05, 2010 @ 17:22
    Eric Boen
    2

    I work with a local SEO company on many of the sites I work on.  They often have a request for the ability to modify the Browser Title, Navigation Text and the page H1, H2 tags as well as the MetaKeywords and MetaDescription. Depending on the project I'll combine the page h1 and h2 under SEO though that may get confusing for content authors.

Please Sign in or register to post replies

Write your reply to:

Draft