ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

A Google search produces in the wrong results

August 12, 2010 4:14pm

Subscribe [3]
  • #1 / Aug 12, 2010 4:14pm

    engweb

    10 posts

    Google search results show the last version of a template as opposed to the correct information listed in the url

    When you search a professors’ name such as Fabio Variola in Google, you get the result
    > Variola, Fabio — Faculty of Engineering (good - what I want)

    When you click on that link you get this url:
    http://www.engineering.uottawa.ca/en/directory/view/simon_foo

    Which is the wrong link plus you get the Photo of someone else(in my newest entry).It seems that Google is referencing the template and not the content.
    Should I be adding keywords to my entries?

    If so, what is the code?
    Thank you, engweb

  • #2 / Aug 13, 2010 1:39am

    John Henry Donovan

    12339 posts

    engweb,

    It looks like there is no logic in your ‘view’ template to display something if somebody just visits

    http://www.engineering.uottawa.ca/en/directory/view/

    You could correct this by turning on Strict URLs
    http://expressionengine.com/legacy_docs/cp/templates/global_template_preferences.html

    Another option is to add a conditional to your view template. Something like below

    {if segment_3 == ''}
    
    //show listing from this page <a href="http://www.engineering.uottawa.ca/en/directory/staff/">http://www.engineering.uottawa.ca/en/directory/staff/</a>
    
    {if:else}
     //Your existing tags
    {/if}


    Does that help?

  • #3 / Aug 13, 2010 10:09am

    engweb

    10 posts

    SORRY, I am not a programmer. Is this the right place for this entry?

    Thanks in advance

    {embed="includes/document_header" title="
    {exp:weblog:entries weblog="directory" limit="1" status="open | active"}
            {title}
    {/exp:weblog:entries}"
    }
    {embed="includes/document_subheader"}
    
    
    <div id="section-details">
            {if country_code !="en"}{embed="includes/fr_left_nav"}{if:else}{embed="includes/left_nav"}{/if}
            {embed="includes/left_features"}
            {embed="includes/contact_info"}
    </div>
        
    <div id="genie-main-content">
    <div id="view_content"> 
        
    
    
        {exp:weblog:entries weblog="directory" limit="1" status=" Active | On leave | On assignment | Acting"}
    
        {categories}
        {exp:weblog:categories weblog="directory" style="linear" show_empty="no" parent_only="yes"} 
        {!-- embed="directory/_embed_child_query_view" my_parent="{category_id}" --}
        {/categories}
    
    {if segment_3 == ''}
    
    //show listing from this page <a href="http://www.engineering.uottawa.ca/en/directory/staff/">http://www.engineering.uottawa.ca/en/directory/staff/</a>
    
    {if:else}
     //Your existing tags
    {/if}  
    
    {!-- New code has been added here added here --}
    
    <div id="gallery">
        {related_entries id="related_gallery_entry"}
        <a href="http://{medium_url}" class="lightbox">{thumb_url}</a>
        {/related_entries}
    </div>
        <h2>{title}</h2>
    <p>    </p><h3>{{country_code}_position_title}</h3>
    
    <p>    </p>
    
    <p>{if degree_1 != ""}<br />
    {degree_1}<br />
    {degree_2}<br />
    {degree_3}<br />
        </p>
    
    <p> </p>
    
    <p> </p>
    
    <p> </p>
    
    <p>{/if}</p>
    
    <p>    {if country_code != "en"}<strong>Courriel :</strong>{if:else}<strong>Email:</strong>{/if} {email_address}</p>
    
    <p>    {if country_code != "en"}<br />
            <strong>Téléphone :</strong>{phone_number} <br />
                {if phone_ext}<strong> poste :</strong> {phone_ext}<br />
                {/if}<br />
        </p>
    
    <p>    {if:else}<br />
            <strong>Telephone: </strong> {phone_number} <br />
                {if phone_ext} <strong>extension:</strong> {phone_ext}<br />
                {/if}<br />
        {/if}<br />
        <br />
                {if web_link != ""}<br />
                </p><h3>Web</h3>
    <p>            {web_link}<br />
                {/if}</p>
    
    <p>{if {country_code}_research_interest_primary != ""}</p><h3>{if country_code != "en"}Domaine de recherche :{if:else}Research Interests:{/if}</h3><p> <br />
    {{country_code}_research_interest_primary}<br />
    {{country_code}_research_interest_secondary}<br />
    {/if}</p>
    
    <p>{if {country_code}_biography_intro !=""}</p><h3>{if country_code != "en"}Biographie :{if:else}Biography:{/if}</h3>
    <p>{{country_code}_biography_intro}<br />
    {{country_code}_biography_full}<br />
    {/if}</p>
    
    
    
    <p><br />
        {/exp:weblog:entries}</p>
    
    <p></div><!-- END:#view_content --><br />
    </div><!-- END:#main_content -->    </p>
    
    <p><div id="genie-sidebar" class="secondary"><br />
        {embed="includes/side_bar"}    <br />
    </div><br />
        <br />
    </div><!-- END: section-container --><br />
    </div><!-- END: #main-container --></p>
    
    <p>{embed="includes/document_footer"}

  • #4 / Aug 13, 2010 11:37am

    Ingmar

    29245 posts

    The code John Henry gave you was meant as an example. You will have to fill in the blanks, as it were.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases