Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Duplicate Category URL: Blog and Default layouts
(1 viewing) (1) Guest
Support forum for customers who have purchased JoomSEF 3 (Joomla 1.5 compatible). Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: Duplicate Category URL: Blog and Default layouts

Duplicate Category URL: Blog and Default layouts 15 years, 1 month ago #8793

Hi,
Please, i need help:

I have menu items created to show joomla categories as BLOG layout. For example:
url: index.php?option=com_content&id=7&layout=blog&view=category&Itemid=12
sef: mydomine.com/categoryX/


If a navigate to the CATEGORY, it is all OK.
If a navigate to an ARTICLE and then go back to the category, it is all OK.

BUUUT the problem is when i navigate to the parent SECTION (where the category is inside) (is a Section Blog Layout) another SEF url is created for the category, as Default Layout and the same SEF url:
url: index.php?option=com_content&id=7&layout=default&view=category&Itemid=12
sef: mydomine.com/categoryX/


So, after that i can´t see my categoryX as Blog Layout. It is shows as Default Layout.

I use JoomSEF 3.4.3
joomla 1.5.14
No content extension as "k2" or similars

any ideas?
Last Edit: 15 years, 1 month ago by AGuerrero.
The topic has been locked.

Re:Duplicate Category URL: Blog and Default layouts 15 years, 1 month ago #8794

i have found that if you modify/hack the joomla core the problem go out:

views.html.php:
"$category->link = JRoute::_(ContentHelperRoute::getCategoryRoute($category->slug, $category->section).'&layout=default');"
to:
"$category->link = JRoute::_(ContentHelperRoute::getCategoryRoute($category->slug, $category->section));"


but, i am not sure to modify the joomla core (i am not expert, problems with updates, etc.)

this is the only solution?
The topic has been locked.

Re:Duplicate Category URL: Blog and Default layouts 15 years, 1 month ago #8853

  • jaku
Well,

you could manually update the duplicate URL by adding some identifier to distinct between blog and default laoyout.
So e.g. modify the link for default layout from:
sef: mydomine.com/categoryX/ to
sef: mydomine.com/categoryX-list/

Then both links will work, while one will show blog layout and the other default layout.

Anyway, thanks for this post, we will consider incorporating the disctiction between diifferent layout types in content SEF extension settings.

A small update:
also, a partial solution could be identifying layout as non-sef variable in content extension settings, but that would cause that ?layout=xxx string would be added to every URL for content component.
Last Edit: 15 years, 1 month ago by .
The topic has been locked.

Re:Duplicate Category URL: Blog and Default layouts 15 years, 1 month ago #8862

So,

Solution 1:
- rewritethe url with ?layout=default to sef: mydomine.com/categoryX-list/ or similar.

Great solution. tested and it is working ok!!!) thanks.

-------
SOLUTION 2

also, a partial solution could be identifying layout as non-sef variable in content extension settings, but that would cause that ?layout=xxx string would be added to every URL for content component.

(not tested, but sounds great too)

-------
and SOLUTION 3.0

i have found that if you "modify/hack" the joomla core the problem go out:
views.html.php:
"$category->link = JRoute::_(ContentHelperRoute::getCategoryRoute($category->slug, $category->section).'&layout=default');"
to:
"$category->link = JRoute::_(ContentHelperRoute::getCategoryRoute($category->slug, $category->section));"
or
"$category->link = JRoute::_(ContentHelperRoute::getCategoryRoute($category->slug, $category->section).'&layout=blog');"


this is not recommended because of problems with updates of joomla. See better solution 3.1:

SOLUTION 3.1

As you can see in the "beez" template (comes with joomla installation), you can overwrite the joomla core without modificate it. Just go to the HTML folder inside the template and follow this instruccions:
ezinearticles.com/?id=1736774 (or search for "joomla template not modify core" or similar).
Copy and modify there "views.html.php" as in the beez template, but in your template:
views.html.php:
"$category->link = JRoute::_(ContentHelperRoute::getCategoryRoute($category->slug, $category->section).'&layout=default');"
to:
"$category->link = JRoute::_(ContentHelperRoute::getCategoryRoute($category->slug, $category->section));"
or
"$category->link = JRoute::_(ContentHelperRoute::getCategoryRoute($category->slug, $category->section).'&layout=blog');"


I use this solution. Also modifing the default layout, you can insert H1, h2 headers, or whatever you want to change without modify the joomla core.

bye
greetings from spain and sorry for my english
The topic has been locked.
  • Page:
  • 1
User Login Empty