SEF URLs parameters and slug

Status
Not open for further replies.
Exactly, the "slugged" URL is /guide-voyage/destinations/details/8/9-reserve-de-botlierskop.html, so the canonical url has to be the exact same... I know seo rules are anoying, but unfortunately we have to play the game...
 
Perfect !
The breadcrumb takes the right menu alias whereas the list canonical tag is the menu URL. Your mission is well accomplished !

Just one question, if I may...
Do you think it's possible to grab the slug in a CDD or DBjoin field concat ? Any placeholder like "view=detail&rowid={thistable}.{slug-placeholder}&Itemid=xxx" maybe ?
I'm expecting a negative answer, don't worry ! ;-)
 
I don' think that's possible, as you are still building the query when the CONCAT is generated, so there is no row data to use as a placeholder.
 
Hi,

Back on this, there is still a problem.
Whereas list pages take menu url as canonical tags (when there is a menu), detail pages don't...

As my homepage is a fabrik detail page , its canonical looks like <link href="/details/35/14.html" rel="canonical">
See... not good for SEO at all... my homepage will never be indexed...

The same thing happens for forms.

I was wondering if it's possible to indicate the menu URL as canonical if the detail or form page is linked to a menu ?
If not, is there any way to remove the canonical tag ? For example remove the tag if there's no slug selected in the list params... ?

Thanks for any help !
 
Looking at this now. Not sure how far I'll get, as the router is a bit of a closed book to me, but I need to wrap my head round it ...

So just to be clear, your home page is a Fabrik details menu item?

-- hugh
 
So, I get ...

Code:
  <link rel="canonical" href="/joomla34/index.php/fabrik/main-form/details/2/1-dd-test" />

... on a URL of ...

Code:
http://localhost/joomla34/index.php/fabrik/main-form

Whereas on my list link I get ...

Code:
  <link rel="canonical" href="/joomla34/index.php/fabrik/main-test" />

... which matches the URL.

So I presume my mission, should I choose to accept it, is to get the canonical link for the details to be the same as the URL it was loaded on, as per the list view.

-- hugh
 
Hi Hugh, did you see anything broken ?
If you want to put it on github, I can also try it on my dev site and come back to you...
 
Oh, I committed that days ago. When you are waiting for a commit, just watch the commit list on github. I'm not very good at remembering to update threads, or finding them when I do remember .

Sent from my HTC One using Tapatalk
 
Hehe, no problem. Now I know !
The commit works great, thanks !

Just one last question : I am setting the OpenGraph tags for Facebook and am looking for a way to get the canonical url.
I'd like to use the to $document->addCustomTag function in the template files to create a new meta for og:url property.

Do you know how it's possible to grab this canonical URL in the templates files ?
JDocument/getMetaData doesn't seem to work on the Fabrik canonical tag.
 
Hmm. At the moment, it's only built in the setCanonicalLink() method in the base view.

What I can do is split out the bit that works out the URL into getCanonicalURL(), which you should then be able to call as $this->getCanonicalURL(). Back in a few mins ...

-- hugh
 
Thanks
I updated the files, but getCanonicalURL() gives me a blank page (doesn't exist ?) and getCanonicalLink() returns nothing (I get my og:url property empty).
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top