with sh404sef canonicals are always current point of view

More
11 years 9 months ago #33428 by pabro
Hm ... I want to have article urls with catgeories but also with canonicals. It is able in sh404sef to add canonicals manually but its not comfortable by 800 and daily new urls.

So, if anyone could help me to find a solution i will pay for it. My wish is to set url of main category, selected in article, as default canonical url.

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #33434 by ggppdk
Hello, i checked and
Canonical URL for item is different with and without SH404SEF, and it depends on current category, the item may look differently depending from which category it is viewed.

We can discuss if canonical URL of item should be the same for all categories,

You could make canonical URL for item same regardless from which category it is viewed by using always the main-category id like this:

in file
components/views/item/view.html.php find and replace line
Code:
$ucanonical = $base . JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, $item->categoryslug));
with:
Code:
$ucanonical = $base . JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, $item->catid));

Please test and report back here (you might have to clear your cache)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #33437 by pabro
Thank you a lot, this works perfect!!! :)

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #33441 by ggppdk
So what do you think, should this change be permanent to our code?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #33442 by pabro
I would say "yes".

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #33444 by ggppdk
Content may not always be same though ,

e.g in template you could use current category to display different fields


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.486 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline