SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wanting to add Canonical link to this complex Header - help please

    Could someone assist me in adding Canonical link to my Header

    http://www.dating-asian-singles.com/

    <link rel="canonical" href="http://www.dating-asian-singles.com/page..........." />

    I have made BOLD the code text where I was trying to add the Canonical link

    My page header.tpl looks like this below

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <!-- IF active_module == "member_profile" AND hide_content != "1" -->
    	<title>{member_username} | {htmlentities:app_page} | {htmlentities:settings.app_title}</title>
    <!-- ELSEIF (active_module == "member_albums" OR active_module == "member_pictures" OR active_module == "member_pictures_view") AND hide_content != "1" -->
    <!-- IF picture_description -->
    <title>{member_username} | {trim:picture_description,64} | {htmlentities:settings.app_title}</title>
    <!-- ELSEIF album_description -->
    <title>{member_username} | {trim:album_description,64} | {htmlentities:settings.app_title}</title>
    <!-- ELSE -->
    <title>{member_username} | {htmlentities:app_page} | {htmlentities:settings.app_title}</title>
    <!-- ENDIF -->
    <!-- ELSEIF (active_module == "member_videos" OR active_module == "member_videos_view") AND hide_content != "1" -->
    <!-- IF video_description -->
    <title>{member_username} | {trim:video_description,64} | {htmlentities:settings.app_title}</title>
    <!-- ELSE -->
    <title>{member_username} | {htmlentities:app_page} | {htmlentities:settings.app_title}</title>
    <!-- ENDIF -->
    <!-- ELSEIF (active_module == "member_audio" OR active_module == "member_friends" OR active_module == "member_guestbook" OR active_module == "member_gifts" OR active_module == "member_events") AND hide_content != "1" -->
    <title>{member_username} | {htmlentities:app_page} | {htmlentities:settings.app_title}</title>
    <!-- ELSEIF (active_module == "member_blog" OR active_module == "member_blog_entry") AND hide_content != "1" -->
    <!-- IF entry_title -->
    <title>{member_username} | {trim:entry_title,64} | {htmlentities:settings.app_title}</title>
    <!-- ELSE -->
    <title>{member_username} | {htmlentities:app_page} | {htmlentities:settings.app_title}</title>
    <!-- ENDIF -->
    <!-- ELSE -->
    <title>{htmlentities:app_page} | {htmlentities:settings.app_title}</title>
    <!-- ENDIF -->
    <!-- IF active_module == "pages" OR active_module == "news_view" -->
    <!-- IF app_description -->
    <meta name="description" content="{htmlentities:app_description}" />
    <!-- ELSE -->
    <meta name="description" content="{htmlentities:settings.app_description}" />
    <!-- ENDIF -->
    <!-- IF app_keywords -->
    <meta name="keywords" content="{htmlentities:app_keywords}" />
    <!-- ELSE -->
    <meta name="keywords" content="{htmlentities:settings.app_keywords}" />
    <!-- ENDIF -->
    <!-- ELSE -->
    <meta name="description" content="{htmlentities:settings.app_description}" />
    <meta name="keywords" content="{htmlentities:settings.app_keywords}" />
    <!-- ENDIF -->
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="{virtual_path}includes/js/jquery.js"></script>
    <!-- IF loggedin AND settings.enable_chat AND session.can_chat -->
    <script type="text/javascript" src="{virtual_path}includes/js/jquery.jgrowl.js"></script>
    <!-- ENDIF -->
    <script type="text/javascript" src="{virtual_path}includes/js/misc.js"></script>
    <link rel="stylesheet" type="text/css" href="{virtual_tpl_path}{session.template}/media/reset.css" />
    <link rel="stylesheet" type="text/css" href="{virtual_tpl_path}{session.template}/media/site.css" />
    <link rel="stylesheet" type="text/css" href="{virtual_tpl_path}{session.template}/media/sidebar.css" />
    <link rel="stylesheet" type="text/css" href="{virtual_tpl_path}{session.template}/media/content.css" />
    <link rel="stylesheet" type="text/css" href="{virtual_tpl_path}{session.template}/media/forms.css" />
    <!-- IF loggedin AND settings.enable_chat AND session.can_chat -->
    <link rel="stylesheet" type="text/css" href="{virtual_tpl_path}{session.template}/media/notify.css" />
    <!-- ENDIF -->
    <!-- IF active_module == "homepage" -->
    <link rel="stylesheet" type="text/css" href="{virtual_tpl_path}{session.template}/media/homepage.css" />
    <!-- ENDIF -->
    <!-- IF active_module == "news" AND settings.enable_news_feed -->
    <link rel="alternate" type="application/rss+xml" title="{htmlentities:settings.app_title} | {htmlentities:app_page}" href="{virtual_path}{ifelse:settings.fancy_urls,"1","news/rss/","index.php?m=news&p=rss"}" />
    <!-- ELSEIF (active_module == "member_blog" OR active_module == "member_blog_entry") AND settings.enable_blog_feed -->
    <link rel="alternate" type="application/rss+xml" title="{htmlentities:settings.app_title} | {htmlentities:app_page}" href="{virtual_path}{member_blog_rss_link}" />
    <!-- ELSEIF active_module == "member_guestbook" AND settings.enable_guestbook_feed -->
    <link rel="alternate" type="application/rss+xml" title="{htmlentities:settings.app_title} | {htmlentities:app_page}" href="{virtual_path}{member_guestbook_rss_link}" />
    <!-- ELSEIF active_module == "events" AND settings.enable_events_feed -->
    <link rel="alternate" type="application/rss+xml" title="{htmlentities:settings.app_title} | {htmlentities:app_page}" href="{virtual_path}{ifelse:settings.fancy_urls,"1","events/rss/","index.php?m=events&p=rss"}" />
    <!-- ENDIF -->
    <!-- IF active_module == "account_audio_edit" OR active_module == "account_pictures_edit" OR active_module == "account_events_pictures_edit" OR active_module == "account_videos_edit" -->
    <link rel="stylesheet" type="text/css" href="{virtual_tpl_path}{session.template}/media/fileuploads.css" />
    <script type="text/javascript" src="{virtual_path}includes/js/jquery.uploadify.js"></script>
    <!-- ENDIF -->
    <!-- IF active_module == "account_audio_edit" OR active_module == "account_pictures_edit" OR active_module == "account_events_pictures_edit" OR active_module == "account_videos_edit" OR active_module == "account_audio" OR active_module == "member_audio" OR active_module == "member_videos" OR active_module == "member_videos_view" -->
    <script type="text/javascript" src="{virtual_path}includes/js/swfobject.js"></script>
    <!-- ENDIF -->
    <!-- IF active_module == "account_photo_thumbnail" OR active_module == "account_pictures_thumbnail" -->
    <link rel="stylesheet" type="text/css" href="{virtual_path}media/css/jquery.jcrop.css" />
    <script type="text/javascript" src="{virtual_path}includes/js/jquery.jcrop.js"></script>
    <!-- ENDIF -->
    <!-- IF active_module == "member_profile" OR active_module == "member_blog_entry" OR active_module == "events_details" OR active_module == "account_photo" OR active_module == "account_pictures_edit" OR active_module == "account_blog_edit" OR active_module == "account_events_pictures_edit" -->
    <script type="text/javascript" src="{virtual_path}includes/js/jquery.zoom.js"></script>
    <script type="text/javascript" language="javascript">
    $(document).ready(function() {
    	$('a.picture_zoom').fancyZoom({ldelim}scaleImg: true, closeOnClick: true, directory: '{virtual_path}media/images/zoom'{rdelim});
    });
    </script>
    <!-- ENDIF -->
    </head>
    <body <!-- IF loggedin AND settings.enable_chat AND session.can_chat -->onload="checkChat({settings.auto_chat_check},{settings.auto_check_sec},'{lang:"core","chat_request"}');"<!-- ENDIF -->>
    <div id="page_wrap">
    	<div id="page">
    		<div id="header_wrap">
    			<div id="header">
    				<h1><span>{settings.app_title}</span></h1>
    				<div class="banner">{banners:group="header"}</div>
    				<div class="clear"></div>
    			</div>
    		</div>
    		<div class="clear"></div>
    		<div id="headernav_wrap">
    			<div id="headernav">
    				<ul>
    					<li class="first">{anchor:url1="",url2="",name="core|menu_index",pre="<span>",pro="</span>"}</li>
    					<!-- IF settings.is_news -->
    						<li>{anchor:url1="news/",url2="index.php?m=news",name="core|menu_news",pre="<span>",pro="</span>"}</li>
    					<!-- ENDIF -->
    					<!-- IF loggedin == "0" -->
    						<li>{anchor:url1="account/register/",url2="index.php?m=account_register",name="core|menu_register",pre="<span>",pro="</span>"}</li>
    					<!-- ENDIF -->
    					<li>{anchor:url1="search/",url2="index.php?m=search",name="core|menu_search",pre="<span>",pro="</span>"}</li>
    					<!-- IF settings.enable_global_blogs_page -->
    						<li>{anchor:url1="blogs/",url2="index.php?m=blogs",name="core|menu_blogs",pre="<span>",pro="</span>"}</li>
    					<!-- ENDIF -->
    					<!-- IF settings.enable_global_pictures_page -->
    						<li>{anchor:url1="pictures/",url2="index.php?m=pictures",name="core|menu_pictures",pre="<span>",pro="</span>"}</li>
    					<!-- ENDIF -->
    					<!-- IF settings.enable_global_videos_page -->
    						<li>{anchor:url1="videos/",url2="index.php?m=videos",name="core|menu_videos",pre="<span>",pro="</span>"}</li>
    					<!-- ENDIF -->
    					<!-- IF settings.enable_events -->
    						<li>{anchor:url1="events/calendar/",url2="index.php?m=events&p=calendar",name="core|menu_events",pre="<span>",pro="</span>"}</li>
    					<!-- ENDIF -->
    					<!-- IF settings.enable_hotornot_page AND settings.enable_picture_rating -->
    						<li>{anchor:url1="hotornot/",url2="index.php?m=hotornot",name="core|menu_rate",pre="<span>",pro="</span>"}</li>
    					<!-- ENDIF -->
    					<!-- IF session.can_access_cp -->
    						<li>{anchor:host=virtual_cp_path,url1="",url2="",name="core|usermenu_cp",pre="<span>",pro="</span>"}</li>
    					<!-- ENDIF -->
    				</ul>
    			</div>
    		</div>
    		<div class="clear"></div>
    		<!-- IF active_module == "homepage" -->
    			<div class="intro">
    				<div class="text">
    					{page:label="homepage_welcome",template="ext.page_welcome.tpl",cache_time=0}
    				</div>
    				<div class="clear"></div>
    				<!-- IF loggedin == "0" -->
    					{anchor:url1="account/register/",url2="index.php?m=account_register",name="core|menu_register",pre="<span>",pro="</span>",class="signup"}
    					<div class="clear"></div>
    				<!-- ENDIF -->
    				<div class="clear"></div>
    			</div>
    		<!-- ELSE -->
    			<div id="subheader_wrap">
    				{htmlentities:app_page} | {htmlentities:settings.app_title}
    			</div>
    		<!-- ENDIF -->
    		<div class="clear"></div>
    		<!-- IF loggedin -->
    			<div id="usernav_wrap">
    				<div id="usernav">
    					<ul>
    						<li class="first nav_profile">
    							{anchor:url1="account/home/",url2="index.php?m=account_home",name="core|usermenu_outter_profile",class="outter"}
    							<ul>
    								<li class="home">{anchor:url1="account/home/",url2="index.php?m=account_home",name="core|usermenu_page"}</li>
    								<li class="profile">{anchor:url1="account/profile/",url2="index.php?m=account_profile",name="core|usermenu_profile"}</li>
    								<li class="photo">{anchor:url1="account/photo/",url2="index.php?m=account_photo",name="core|usermenu_photo"}</li>
    							</ul>
    						</li>
    						<!-- IF settings.enable_messaging -->
    							<li class="nav_messages<!-- IF session.new_messages --> nav_messages_new<!-- ENDIF -->">
    								<a href="{virtual_path}{ifelse:settings.fancy_urls,"1","account/messages/","index.php?m=account_messages"}" class="outter" title="{lang:"core","usermenu_outter_messages"}">{lang:"core","usermenu_outter_messages"}<!-- IF session.new_messages --> ({session.new_messages})<!-- ENDIF --></a>
    								<ul>
    									<li class="inbox"><a href="{virtual_path}{ifelse:settings.fancy_urls,"1","account/messages/","index.php?m=account_messages"}" title="{lang:"core","usermenu_messages_inbox"}">{lang:"core","usermenu_messages_inbox"}<!-- IF session.new_messages --> ({session.new_messages})<!-- ENDIF --></a></li>
    									<li class="sent">{anchor:url1="account/messages/sent/",url2="index.php?m=account_messages&p=sent",name="core|usermenu_messages_sent"}</li>
    								</ul>
    							</li>
    						<!-- ENDIF -->
    						<!-- IF settings.enable_pictures OR settings.enable_videos OR settings.enable_audio -->
    							<li class="nav_media">
    								{anchor:url1="account/albums/",url2="index.php?m=account_albums",name="core|usermenu_outter_media",class="outter"}
    								<ul>
    									<!-- IF settings.enable_pictures -->
    										<li class="pictures">{anchor:url1="account/albums/",url2="index.php?m=account_albums",name="core|usermenu_pictures"}</li>
    									<!-- ENDIF -->
    									<!-- IF settings.enable_videos -->
    										<li class="videos">{anchor:url1="account/videos/",url2="index.php?m=account_videos",name="core|usermenu_videos"}</li>
    									<!-- ENDIF -->
    									<!-- IF settings.enable_audio -->
    										<li class="audio">{anchor:url1="account/audio/",url2="index.php?m=account_audio",name="core|usermenu_audio"}</li>
    									<!-- ENDIF -->
    								</ul>
    							</li>
    						<!-- ENDIF -->
    						<!-- IF settings.enable_guestbooks OR settings.enable_blogs OR settings.enable_events OR settings.enable_gifts -->
    							<li class="nav_apps <!-- IF settings.enable_guestbooks AND session.new_guestbooks OR settings.enable_gifts AND session.new_gifts -->nav_notice<!-- ENDIF -->">
    								{anchor:url1="account/guestbook/",url2="index.php?m=account_guestbook",name="core|usermenu_outter_apps",class="outter"}
    								<ul>
    									<!-- IF settings.enable_blogs -->
    										<li class="blog">{anchor:url1="account/blog/",url2="index.php?m=account_blog",name="core|usermenu_blog"}</li>
    									<!-- ENDIF -->
    									<!-- IF settings.enable_gifts -->
    										<li class="gifts"><a href="{virtual_path}{ifelse:settings.fancy_urls,"1","account/gifts/","index.php?m=account_gifts"}" title="{lang:"core","usermenu_gifts"}">{lang:"core","usermenu_gifts"}<!-- IF session.new_gifts --> ({session.new_gifts})<!-- ENDIF --></a></li>
    									<!-- ENDIF -->
    									<!-- IF settings.enable_guestbooks -->
    										<li class="guestbook"><a href="{virtual_path}{ifelse:settings.fancy_urls,"1","account/guestbook/","index.php?m=account_guestbook"}" title="{lang:"core","usermenu_guestbook"}">{lang:"core","usermenu_guestbook"}<!-- IF session.new_guestbooks --> ({session.new_guestbooks})<!-- ENDIF --></a></li>
    									<!-- ENDIF -->
    									<!-- IF settings.enable_events -->
    										<li class="events">{anchor:url1="account/events/",url2="index.php?m=account_events",name="core|usermenu_events"}</li>
    									<!-- ENDIF -->
    								</ul>
    							</li>
    						<!-- ENDIF -->
    						<!-- IF settings.enable_friends OR settings.enable_favorites -->
    							<li class="nav_network <!-- IF settings.enable_friends AND session.new_friends -->nav_notice<!-- ENDIF -->">
    								{anchor:url1="account/friends/",url2="index.php?m=account_friends",name="core|usermenu_outter_network",class="outter"}
    								<ul>
    									<!-- IF settings.enable_friends -->
    										<li class="friends"><a href="{virtual_path}{ifelse:settings.fancy_urls,"1","account/friends/","index.php?m=account_friends"}" title="{lang:"core","usermenu_friends"}">{lang:"core","usermenu_friends"}<!-- IF session.new_friends --> ({session.new_friends})<!-- ENDIF --></a></li>
    									<!-- ENDIF -->
    									<!-- IF settings.enable_favorites -->
    										<li class="favorites">{anchor:url1="account/favorites/",url2="index.php?m=account_favorites",name="core|usermenu_favorites"}</li>
    									<!-- ENDIF -->
    									<!-- IF settings.enable_visitors -->
    										<li class="visitors">{anchor:url1="account/visitors/",url2="index.php?m=account_visitors",name="core|usermenu_visitors"}</li>
    									<!-- ENDIF -->
    									<!-- IF settings.enable_blocked_members -->
    										<li class="blocked">{anchor:url1="account/blocked/",url2="index.php?m=account_blocked",name="core|usermenu_blocked"}</li>
    									<!-- ENDIF -->
    								</ul>
    							</li>
    						<!-- ENDIF -->
    						<li class="nav_settings">
    							{anchor:url1="account/settings/",url2="index.php?m=account_settings",name="core|usermenu_outter_settings",class="outter"}
    							<ul>
    								<li class="settings">{anchor:url1="account/settings/",url2="index.php?m=account_settings",name="core|usermenu_settings"}</li>
    								<li class="notifications">{anchor:url1="account/notifications/",url2="index.php?m=account_notifications",name="core|usermenu_notifications"}</li>
    								<li class="privacy">{anchor:url1="account/privacy/",url2="index.php?m=account_privacy",name="core|usermenu_privacy"}</li>
    								
    									<!-- IF settings.enable_upgrades AND session.can_upgrade_account -->
    										<li class="upgrade">{anchor:url1="account/upgrade/",url2="index.php?m=account_upgrade",name="core|usermenu_upgrade"}</li>
    									
    									<!-- IF settings.enable_credits -->
    										<li class="credits">{anchor:url1="account/upgrade/credits/",url2="index.php?m=account_upgrade&p=credits",name="core|usermenu_credits"}</li>
    									<!-- ENDIF -->
    								<!-- ENDIF -->
    							</ul>
    						</li>
    						<li class="nav_logout">{anchor:url1="account/logout/",url2="index.php?m=account_logout",name="core|usermenu_logout",class="outter"}</li>
    					</ul>
    				</div>
    			</div>
    			<div class="clear"></div>
    		<!-- ENDIF -->
    		<div id="container_wrap">
    			<div id="container">
    				<div id="sidebar_wrap">
    					<div id="sidebar">
    						<!-- INCLUDE sidebar.tpl -->
    					</div>
    				</div>
    				<div id="content_wrap">
    					<div id="content">

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,317
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    I have made BOLD the code text where I was trying to add the Canonical link
    I don't see that anywyere. But anyhow, just stick it anywhere between the <head></head> tags.

  3. #3
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you ralph.m , all done


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •