Problem with Viewer URLs in combination with AddThis.com service
2 posts by 2 authors in: Forums > CMS Builder
Last Post: October 12, 2010 (RSS)
Hi There,
We have a built the site at www.theeburycollection.com using CMS Builder.
We have the following problem:
1) The URL http://www.theeburycollection.com/wedding-blog?Jo-Thorne-London-Hair-jewellery-19 takes us to the article called Jo Thorne London Hair Jewellery. It is article no 19 and the page is displayed based on the article number using the CMS builder instruction "whereRecordNumberInUrl(1)".
2) Each article can be posted to social media sites or email using the AdThis.com service. AddThis.com adds its own variables for tracking purposes. By the time the URL reaches Facebook or email, it ends up looking like this: http://www.theeburycollection.com/wedding-blog?Jo-Thorne-London-Hair-jewellery-19=&sms_ss=email&at_xt=4cb3390a24417ed7,0
This takes you through to an entirely different article which seems to be based on the parameter for at_xt. I say this because if you remove everytyhing after the last "=" you do get back to the correct article.
How can we work around this while working with the in-built CMS Builder instructions?
Many thanks for your support, Marcus Link
We have a built the site at www.theeburycollection.com using CMS Builder.
We have the following problem:
1) The URL http://www.theeburycollection.com/wedding-blog?Jo-Thorne-London-Hair-jewellery-19 takes us to the article called Jo Thorne London Hair Jewellery. It is article no 19 and the page is displayed based on the article number using the CMS builder instruction "whereRecordNumberInUrl(1)".
2) Each article can be posted to social media sites or email using the AdThis.com service. AddThis.com adds its own variables for tracking purposes. By the time the URL reaches Facebook or email, it ends up looking like this: http://www.theeburycollection.com/wedding-blog?Jo-Thorne-London-Hair-jewellery-19=&sms_ss=email&at_xt=4cb3390a24417ed7,0
This takes you through to an entirely different article which seems to be based on the parameter for at_xt. I say this because if you remove everytyhing after the last "=" you do get back to the correct article.
How can we work around this while working with the in-built CMS Builder instructions?
Many thanks for your support, Marcus Link
Re: [linkandco] Problem with Viewer URLs in combination with AddThis.com service
By Jason - October 12, 2010
Hi Marcus,
What we need to do here is to check if the AddIt variables have been added to the string and if they have, temporarily remove them while we select our record.
Put this code right BEFORE your getRecords code:
If there is more than one variable in the query string, it will strip them out. Next, put this line right AFTER your getRecords code:
This puts the query string back the way it was incase it needs to be used anywhere else on the page.
Hope this helps.
What we need to do here is to check if the AddIt variables have been added to the string and if they have, temporarily remove them while we select our record.
Put this code right BEFORE your getRecords code:
$tempQueryString = $_SERVER['QUERY_STRING'];
if(count($_REQUEST)>1){
$temp= array_keys($_REQUEST);
$_SERVER['QUERY_STRING']=$temp[0];
}
If there is more than one variable in the query string, it will strip them out. Next, put this line right AFTER your getRecords code:
$_SERVER['QUERY_STRING'] = $tempQueryString;
This puts the query string back the way it was incase it needs to be used anywhere else on the page.
Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/