1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

SEF URLs parameters and slug

Discussion in 'Professional Support' started by Ecovoyageurs, Sep 29, 2015.

Thread Status:
Not open for further replies.
  1. rob

    rob Administrator Staff Member

    Level: Community
  2. Ecovoyageurs

    Ecovoyageurs Member

    Level: Community
    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...
     
  3. rob

    rob Administrator Staff Member

    Level: Community
  4. Ecovoyageurs

    Ecovoyageurs Member

    Level: Community
  5. rob

    rob Administrator Staff Member

    Level: Community
  6. Ecovoyageurs

    Ecovoyageurs Member

    Level: Community
    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 ! ;-)
     
  7. rob

    rob Administrator Staff Member

    Level: Community
    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.
     
  8. Ecovoyageurs

    Ecovoyageurs Member

    Level: Community
    OK, no problem, I can still use a field to store the slug if I want to use it in concats...
    Many thanks for your help with this !
     
  9. Ecovoyageurs

    Ecovoyageurs Member

    Level: Community
    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 !
     
  10. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    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
     
  11. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    So, I get ...

    Code (Text):

      <link rel="canonical" href="/joomla34/index.php/fabrik/main-form/details/2/1-dd-test" />
     
    ... on a URL of ...

    Code (Text):

    http://localhost/joomla34/index.php/fabrik/main-form
     
    Whereas on my list link I get ...

    Code (Text):

      <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
     
  12. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    OK, I think I've fixed that, but I'll hold off committing till later, see if anything breaks.

    -- hugh
     
  13. Ecovoyageurs

    Ecovoyageurs Member

    Level: Community
    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...
     
  14. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    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
     
  15. Ecovoyageurs

    Ecovoyageurs Member

    Level: Community
    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.
     
  16. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    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
     
  17. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
  18. Ecovoyageurs

    Ecovoyageurs Member

    Level: Community
    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).
     
  19. Ecovoyageurs

    Ecovoyageurs Member

    Level: Community
    Oops, sorry, I'm wrong, it's just because getCanonicalLink() isn't defined for detail views. Could you add it there also ?
     
  20. Ecovoyageurs

    Ecovoyageurs Member

    Level: Community
    Could you ?
     
Thread Status:
Not open for further replies.

Share This Page