• Home
  • Get help
  • Ask a question
Last post 33 min ago
Posts last week 141
Average response time last week 4 hours 42 min
All time posts 67803
All time tickets 10477
All time avg. posts per day 21

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#7458 – URL generation for menu item single article.

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 22 October 2020 05:28 UTC
markmail

Hi there, 

I'm new to sh404SEF.

In Joomla's native SEF,  url of "Menu item - Single Article" is displayed in this format 

domain.com/top-menu-alias/sub-menu-alias/article-alias

After turning on sh404SEF, the url for menu linked articles are displayed the same as other article

domain.com/top-category-alias/sub-category-alias/article-alias

With sh404SEF, is it possible to achieve the same for articles linked directly from a menu item?

 

Many thanks

Mark

Thursday, 22 October 2020 06:49 UTC
wb_weeblr

Hi

With sh404SEF, is it possible to achieve the same for articles linked directly from a menu item?

It's possible but why would you want to do that? That's one of the SEO problems in Joomla that sh404SEF is meant to solve.

Unless your site of course has lots of URLs indexed by search engines and you want to keep existing URLs?

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Thursday, 22 October 2020 10:05 UTC
markmail

Hi Yannick, 

Thanks for the quick reply.  The reason why I'm asking was because some this is what how the site is currently structured, we have a menu strcture that matches the category/article structure so that we can get a consistent URL structure.

I guess we can re-organised the category/article to the structure we want, so that we don't need to worry about how menu may effect the url.

We have some Quix (page builder)  page that is directly linked from menu item, in that case, it seems in the case of Quix pages (articles), the url will follow the menu structure, is that correct?

See attachment - top level category is [journals] not showing in the image

Thanks, 

 

Mark

Thursday, 22 October 2020 10:08 UTC
markmail
Thursday, 22 October 2020 10:08 UTC
markmail
Thursday, 22 October 2020 10:22 UTC
wb_weeblr

Hi

I guess we can re-organised the category/article to the structure we want, so that we don't need to worry about how menu may effect the url.

That's the entire point of sh404SEF default URL structure: content URL should not depend on how you navigate to it. Joomla uses the menu structure to build URLs and that's not very good. 

We have some Quix (page builder)  page that is directly linked from menu item, in that case, it seems in the case of Quix pages (articles), the url will follow the menu structure, is that correct?

We do not have any specific support for that extension so the URL will be built using the router.php file that this extension should normally provide to build URLs for Joomla.

My first point about not using menu items to build URLs applies to all Joomla content and a some important Joomla extensions for which we produced a dedicated plugin to build URLs, or the extensions makers produced that plugin themselves.

As you probably don't want to re-structure your content at this point, the likely best way forward is to have sh404SEF mimic Joomla SEF URLs. This is done under the By component tab of sh404SEF configuration. Set any component you want to have that enabled for to:

- 1st column: Use default handler  (that's the default)

- 2nd column: User router.php with menu item

You probably want to do that for Joomla content component and Quix at least.

Then Purge Urls from the SEF URL manager so that old ones are deleted and new ones can be re-created.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Thursday, 22 October 2020 12:01 UTC
markmail

Thanks for the advice.

I think we'll change the joomla article strcture to make things easier, so will keep the default sh404sef for com_content and use category/article structure for URL, and just enable "use router.php" for Quix

I'm facing another problem with menu,  I have a menu item [List of Issues - alias: issues] (see image) that is an "Articles > Category List"

The menu strcture for the item is journals > ijase > issues

However when sh404sef reuild urls, the menu on the page is showing the same URL as the menu item [Latest Articles - alias articles]

So when I click on the  [Latest Articles] (url: journals/ijase/articles ) it worked as expected, but when I click on [List of Issues] , the generated url and displayed content is the same as [Latest Articles] (url: journals/ijase/articles )

What do I need to do to make [List of Issues] display "article category list "under the url journals/ijase/issues

ps. We made a dummy menu contains only menu alias to the real menu to maintain a desire url strcture as a workaround with Joomla's SEF, just to let you know incase the image is a little confusing.

Thanks,

Mark

Thursday, 22 October 2020 12:31 UTC
wb_weeblr

Hi

I am a bit confused right now: where are you in your changes? did you re-structure your content yet? did yo purge URLs to get new ones?But let me try to recap/comment:

- the list of issues should have a URL /journals/ijase/articles assuming you changed all the settings we discussed above and purged URLs.

- the "latest articles", I have no idea because it's an "XLayout" menu item and so it's not Joomla content. I do not know what sort of URL this component router.php will produce

What I can see on your screenshot about "Latest articles" is that its alias is "articles". I would think that alias should be "latest-articles". If the alias is "articles" and that component use the menu items to build URLs, then the link will indeed be /journals/ijase/articles

So I need a bit of clarification on where you are now before going any further.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 

 
Friday, 23 October 2020 02:35 UTC
markmail

Hi, 

Yes I have purged urls after changes made and I've reorganised articles/categories around to produce the desired url structure  (See attachment). Articles are under either bottom level categoreis (eg. volume 17  No 1)  or  category ijase.  The goal was do have url structure of the following 

Menu - [Home] > http://localhost/journals/ijase   (this is a [Quix page])

Menu - [Aim and Schope] -> http://localhost/journals/ijase/aims (this is a Joomla [single article])

Menu - [Latest Articles] -> http://localhost/journals/ijase/articles  (this is  xLayout - Magazine , which is a custom layout for com_content based on Joomla [category blog] from the template we're using)

Menu - [List of Issues] -> http://localhost/journals/ijase/issues (thisi is a Joomla  [category list] ) 

example-article  in volume 17  No 1 ->  http://localhost/journals/ijase/articles/17/1/example-article  ( this is a Joomla article clicked from Latest Articles  ) 

xLayout - Magazine is basically a custom layout for com_content from the template we're using, I believe it's similar to [category blog] 

"latest articles" is working as expected and displaying correct content under the correct url no problem, and the alias is "articles" by design (http://localhost/journals/ijase/articles )

"List of Issues" is the one that  isn't working, the url generated for the menu item with the current menu/category/article structure is [ http://localhost/journals/ijase/articles  ]  and this url displays the content of  "latest articles" .  If working correctly, it should display Joomla  [category list].

Any idea what's causing it?

Many thanks, 

Mark

 

Friday, 23 October 2020 08:45 UTC
wb_weeblr

Hi

"List of Issues" is the one that  isn't working, the url generated for the menu item with the current menu/category/article structure is [ http://localhost/journals/ijase/articles  ] 

This is obviously the problem as the URL - which is the only thing that decides of what's displayed - is the one from the other page, "latest-articles"

I see no reason for this as it's a trivial case of Joomla content, a category list. Could you please provide us with superadmin credentials to your website. You can create a temporary account, and delete it afterward, but it must have superuser level.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 

 

 
Friday, 23 October 2020 12:38 UTC
markmail

Hi,

I've just restored the site to a public server http://xxxx.178.90.125

Please login with

username:  xxxx password: xxxx

Note. Ijase journal home menu (home ) isn't working yet, so to get access to the ijase journal home, I have to use  http://xxxx.178.90.125/index.php?option=com_quix&Itemid=874&id=14&lang=en&view=page   I can't figure out any other way to do it.

Thanks, 

Mark

Friday, 23 October 2020 13:48 UTC
wb_weeblr

Hi

So the "List of issues" link is a "Category list" menu item for category #111 ("IJASE List of issues", alias "articles") which itself is a sub-category of category #109 ("International Journal of Applied Science and Engineering", alias "ijase")

The link to that category is therefore /ijase/articles.

Looks like it works as expected.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Saturday, 24 October 2020 09:43 UTC
markmail

ah I see, I'm still getting used to the concept of building url only with article/category strcuture

But I still need to find away to get menu item [Latest Articles]  and  [List of Issues] to work

They are the same category item, but with different layout. Is it possible to have different url for the same category item with two different  layout like the following?

Menu - [Latest Articles] 
SEF url - /journals/ijase/articles
non-SEF url - index.php?option=com_content&Itemid=876&id=111&lang=en&layout=ijase%3Amagazine&view=category

Menu - [List of Issues] 
SEF url - /journals/ijase/issues
non-SEF url - index.php?option=com_content&Itemid=877&id=111&lang=en&view=category

Thanks, 

Mark

Monday, 26 October 2020 13:05 UTC
wb_weeblr

Hi

That's a more tricky one: the standard way is to manually customize one of them. Click on the URL in the SEF URL manager and change it to what you want.

This work as is in most cases but the trick here is that for categories, this has to be done for the first page but also for any paginated page (ie /journals/ijase/issues/page-2, /journals/ijase/issues/page-3,...)

So if that does not work for you, and you can handle a little bit of manipulating files with FTP, you can add a "filter" to customize the URLs as you see fit:

1. Open the file /libraries/weeblr/sh404sef_functions.php

2. Paste the following code in it (asuming it's empty):

<?php
/**
 * sh404SEF hooks file
 */
ShlHook::add( 'sh404sef_after_plugin_build', function ($string, $vars, $pluginType, $extPluginPath) { if ( 'com_content' == wbArrayGet($vars, 'option', '') && 877 === wbArrayGet($vars, 'Itemid') ) { $string = str_replace( 'journals/ijase/articles', 'journals/ijase/issues', $string ); } return $string; } );

3. Delete the URLs involved so that new ones are re-created. 

If you run in any issue, just rename that file to anything else and it will be de-activated.

Any code added here is safe across sh404SEF updates, it won't be overriden or deleted.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 

 
Thursday, 26 November 2020 05:34 UTC
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.