Re: problems with canonical
"Gert van der Spoel" <[email protected]> Thu, 24 May 2018 17:44:19 +0300
| Newsgroups | gmane.comp.web.interchange.users |
|---|---|
| Message-ID | <[email protected]> |
> -----Original Message----- > From: [email protected] [mailto:interchange-users- > [email protected]] On Behalf Of Steve Bronson > Sent: Thursday, May 24, 2018 17:42 > To: [email protected] > Subject: Re: [ic] problems with canonical > > > > > > > I'm having issues getting canonical to work on my website. Seems > > > > > to be redirecting to fly pages rather than to the product page. > > > > > > > > > > example: my page url: > > > > > https://www.airdelights.com/zerk-cp--Zurn-EZ-Flush- > > > > > Retro-Fit-Automatic-Flush-Unit.html > > > > > > > > > > shows this when you look at view source. > > > > > > > > > > <link rel="canonical" > > > > > href="https://www.airdelights.com/fly/fly_autoflushers2.html"> > > > > > > > > > > Any suggestions on how I can fix this? > > > > > > > > Looking at the source, but don't see the canonical. > > > > You removed it/solved it? > > > > Which version of Interchange are you using? > > > > > > > > CU, > > > > > > > > Gert > > > > > > > > ************************ > > > > I just put the [scratch canonical] back on the top template. > > > > You can see this problem now. > > > > Using interchange 5.10.0 > > > > > > > > Steve B. > > > > > > I'm having a look at the git repo of interchange, but I seem to not > > > be able to find any place where the scratch canonical value is being > > > set ... Is this something custom to your Interchange install? Could > > > be that I'm looking in the wrong place, but a scratch variable is > > > usually not existing by itself. I see one location where canonical > > > is being set (in strap/results.html), but that does not seem to match your > code. > > > > > > CU, > > > > > > Gert > > > ************************** > > > I believe Josh from Endpoint added this to our site. He is no longer > > > at > > endpoint. > > > Top template has [scratch canonical] All the pages and flypages have > > > this code: > > > > > > [tmp canonical]<link rel="canonical" > > > href="__SAMPLEURL__/@@MV_PAGE@@[if scratch > > > mv_add_dot_html].html[/if]">[/tmp] > > > > > > Have no idea how this works, where it's pulling data from, or why > > > it's showing flypage instead of product page. Maybe from catalog.cfg? > > > > > > Steve B. > > > > Your product page is not a static page on your filesystem I assume, > > but is a page built from a flypage? > > https://www.airdelights.com/Xlerator-XL-BW-Hand-Dryers--XL-BW-Xlerator > > - Automatic-Hand-Dryer-in-White.html for example shows > > > > <link rel="canonical" > > href="https://www.airdelights.com/fly/handDryers_fly.html"> > > > > http://docs.icdevgroup.org/cgi-bin/online/vars/MV_PAGE.html describes > > that MV_PAGE gives the current page being served, which is in these > > cases a flypage .. That the content of it is dynamically filled > > because of the product that has been selected, still makes it a fly page. > > > > > > https://www.airdelights.com/cat/manual_faucets.html has <link > > rel="canonical" > > href="https://www.airdelights.com/manual_faucets/manual_faucets_catego > > r > > y.html"> > > > > Etc .. . > > > > So for your flypage you'd have to replace '@@MV_PAGE@@[if scratch > > > mv_add_dot_html].html[/if]">' with the current url .. maybe a sku or > > something more SEO-like ... I guess that also depends on your install > > (I'm not completely into the minute details of all available tags to get this > done) .. > > > > CU, > > > > Gert > > > > ****************** > > I see what your saying. So, I changed the code to look like this: > > > > [fly-list code="[data session arg]"] > > [tmp canonical]<link rel="canonical" href="__SAMPLEURL__/[item-field > > sku]">[/tmp] [/fly-list] > > > > now the canonical is showing: <link rel="canonical" > > href="https://www.airdelights.com/zerk-cp"> > > > > This is improvement, but I don't think this is the solution. > > > > What would work is code that would just display the url of the page as > > it is displayed in the browser url address bar. So if your are on this page: > > https://www.airdelights.com/Zerk-CP-M--EZ-Flush-Retro-Fit-Automatic-Fl > > ush- > > Unit-with-Metal-Cover.html > > > > The canonical would say: > > > > <link rel="canonical" > > href="https://www.airdelights.com/Zerk-CP-M--EZ-Flush- > > Retro-Fit-Automatic-Flush-Unit-with-Metal-Cover.html"> > > > > Any idea on how I might accomplish this? > > > > Steve B. > > Maybe have a look in the code of https://www.airdelights.com/automatic- > flushers.html > There it creates the URL to this page, perhaps it can tell you what you need to > use. > > Else hopefully someone else is more knowledgeable with regard to SEO urls > and where to find this value with Interchange. And if it is a custom piece of > code for your site you'll have to get an 'Interchanger' to figure it out for you by > looking at the code (if you can't find it yourself :) ). > > CU, > > Gert > ************************** > automatic-flushers.html page is a static page. Has the same code as dynamic > pages: > [tmp canonical]<link rel="canonical" > href="__SAMPLEURL__/@@MV_PAGE@@[if scratch > mv_add_dot_html].html[/if]">[/tmp] > > That code seems to work on static pages, but not dynamic. > > Must be a way to show url in the address bar of browser as the canonical. > Anyone have any suggestions??? > > Steve B. Not in the URL of the canonical, I mean the URL of the link that brings you to the specific product page. There are on that page several products displayed with links to a flypage ... So see how those are being called and maybe that's the parameter you need to use.