Skip to main content
Topic: Improvement for Categorie-Link (Read 3016 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Improvement for Categorie-Link

The improvement I found by this bug.

Of existing link in the breadcrumbs /index.php#c*   *= Categorienumber. My idea would be to make the way with a link to Board /index.php?board=*   *=Boardnumber.

open root/sources/subs/Load.php
find
Code: (php) [Select]
				'url' => $scripturl . '#c' . $board_info['cat']['id'],
replace with
Code: (php) [Select]
				'url' => $scripturl . '?categorie=' . $board_info['cat']['id'],

The new link to the category would be /index.php?categorie=*   *= Categorienumber.






Regards Stephan

Re: Improvement for Categorie-Link

Reply #1

Wants make again attention :-[



Regards Stephan

Re: Improvement for Categorie-Link

Reply #2

I would agree if the category had a page for each of them (like vB), but in the current state, it doesn't really give much more than what we have now, apart from fixing a bug with an addon that was better fixed within the addon.

I don't know if adding a page for categories is necessary (genuine question, I really have no idea which one is better), so I'm open.
Bugs creator.
Features destroyer.
Template killer.

Re: Improvement for Categorie-Link

Reply #3

That #c is used in a few places in the the php and js code I think.   I have not objection to changing it to be a more descriptive var, even if thats all this ends up doing.

Re: Improvement for Categorie-Link

Reply #4

The suggestion from winstar, though, is to replace the "#c" with an "?c=", so from an anchor to a parameter. The two are two different things. ;)
Bugs creator.
Features destroyer.
Template killer.

Re: Improvement for Categorie-Link

Reply #5

My thought is that's in the Url, I think it is better to read for Google (SEO). And it would also be an info in the url that you calls a Category. Would then also uniformly with the url to Board  => localhost/elk106/index.php?board=1.0.
Regards Stephan

Re: Improvement for Categorie-Link

Reply #6

You would have to have separate pages for categories and that's not the idea of categories.

Re: Improvement for Categorie-Link

Reply #7

There shall be no idea for a new page for Categories. But a redesign for the URL of the categories.

Regards Stephan

Re: Improvement for Categorie-Link

Reply #8

There is a language barrier here.

It's can't go to the category on the boardindex without Javascript unless it uses #.

Changing it to #category or #categorie or whatever doesn't help with SEO at all. Sorry, some feature requests were never meant to be.

Re: Improvement for Categorie-Link

Reply #9

Quote from: wintstar – There shall be no idea for a new page for Categories. But a redesign for the URL of the categories.
The url you propose doesn't do what the current one does.

Code: [Select]
http://www.elkarte.net/community/index.php#c1
This url brings you to the middle of the page, where the category "Elk Development" starts.
Code: [Select]
http://www.elkarte.net/community/index.php?category=1
doesn't bring you in the same place. If there is no page specific for the category (showing only the Elk Development boards), it would bring you to the home page, but it wouldn't be different from:
Code: [Select]
http://www.elkarte.net/community/index.php
You can try the different urls and see the difference.

Now, changing things the way you are proposing, from a SEO point of view would be "bad", because you end up with two urls leading to the same exact page:
Code: [Select]
http://www.elkarte.net/community/index.php
http://www.elkarte.net/community/index.php?category=1
And this is generally a bad thing. So you'd have to specify a canonical url so that when google opens the second page it will be instructed to consider it the same as the first.

At the moment, instead:
Code: [Select]
http://www.elkarte.net/community/index.php
http://www.elkarte.net/community/index.php#c1
are exactly the same page for google point of view, and as such there is no need to change anything.

In order to "change" that link, we'd have to at least have a behaviour like this SMF mod.
Bugs creator.
Features destroyer.
Template killer.

Re: Improvement for Categorie-Link

Reply #10

http://www.elkarte.net/community/index.php#c1  goes to category 1

http://www.elkarte.net/community/index.php  goes to Index

Is it not possible that change the URL so that it leads to the category, but not not lead to Index. Look here http://www.elkarte.net/community/index.php?topic=3153.msg22334#msg22334 => ?action=forum#c.

It should be possible to change the URL, without leading to an overall category page, or not? Is there no way behind action?category =*  from the database to retrieve the category number?




Regards Stephan

Re: Improvement for Categorie-Link

Reply #11

#c1 goes to the c1 anchor on the index. It's the same page as index but just jumps to a position there

It would be the same template. Pretty much just a boardindex with only 1 category. I get what you want, but I don't think it is worth adding another variable without an action and even then, the action wouldn't really be used that much so why not just make it a mod.

Re: Improvement for Categorie-Link

Reply #12

It's more complicated as I thought. It's too much effort, so it is not worthwhile.
Regards Stephan