Hello,

I'm using subcategories this way (example)

- Engines
- Renault
- Ferrari
- Wheels
- Renault
- Ferrari

The problem is that Drigg creates the url to subcategories this way:
http://myhomepage.com/Renault

So, the url are the same if I use the same names for the subcategories, and it dosen't work.

Is there any way to set the paths to something like:

http://myhomepage.com/Engines/Renault
http://myhomepage.com/Wheels/Renault

Thank you in advance!

Comments

Javier López’s picture

Ups, spaces were removed and I don't know how to edit the previous entry. Here it is the tree:

* Engines
- Renault
- Ferrari

* Wheels
- Renault
- Ferrari

mercmobily’s picture

Status: Active » Fixed

Hi,

There is no way for Drigg to have subcategories with the same name. This is pretty much a structural issue -- the category cache only stores the category name, plus too many other things would have to change and become 4x more complicated.

Sorry...

Merc.

mercmobily’s picture

Status: Fixed » Closed (won't fix)
Javier López’s picture

Status: Closed (won't fix) » Postponed (maintainer needs more info)

:(

Thanks for answer.

Any other way I can get this done? Maybe something similiar? It would be enough for me if I can make categories with different "safe name" and showing in the menu category names.

I mean, It would be enough If I can do this:

http://myhomepage.com/Engines/RenaultEngines
http://myhomepage.com/Wheels/RenaultWheels

And in then drawing in the menu something like:

* Engines
- Renault

* Wheels
- Renault

Is that possible? How can I achive that without having to make a big (and horrible) big "switch ()" from scratch.

Please, let me close this thread by my own, because I really had trouble to find it after you put it like "won't fix".

mercmobily’s picture

Hi,

It's _impossible_ to have subcategories with the same name by design, unless you want to rewrite substantial and tricky parts of Drigg.

That's the hard truth... probably not what you want to hear, but that's how it is :-/

Merc.

Javier López’s picture

Hehe, imposible is nothing :)

I "solved" it doing a trick.

For each term, I wrote the name I want to print on the webpage in the Description and letting the term name for the links different.

For example:

http://myhomepage.com/RenaultEngines (Term = RenaultEngines, Description = Renault)
http://myhomepage.com/RenaultWheels (Term = RenaultWheels , Description = Renault)

Then, when printing my menu, I just print not the term names, but the "Description", et voila:

* Engines
- Renault

* Wheels
- Renault

I wasn't able to have the proper urls, but I really needn't them.

Thank you very much!

mercmobily’s picture

Hi,

I suggest you have an underscore in the category name, so that it becomes Renault_Wheels...

Are you sure there are no side effects..?

Merc.

Javier López’s picture

Hi,

Telepaty! I have just added the "_" (for Seo) before reading your comment :)

About the side effects, there are some:

1) On node, when showing the category name for each entry, it was showing the one with underscore. I dind't achive to get the proper "description" term, because I didn't know how to get if from the node. So I just made another trick, this time I replace the underscores by spaces, and isolated the first word for knowing the section and the subscection:

Having the string "Renault_Engines", I created:

Section = Renault (http://myhomepage.com/Renault)
Subsection= RenaultEngines (http://myhomepage.com/RenaultEngines)

2) And another detail, when submitting the scoop, there is a "Please, select the category" list, that currently showes the category names with the underscores.

I'm currently working in:
a) Only allow the user to select subcategories, no categories.
b) Show the list without the underscores and with a tab for the subsection (currently they have "-", and is not enough in order to see them well)

I'm a bit lost on that points, because I don't know where, in the sourcecode, that list receives the "-" for the subsections.

Can you point in the right direction in order to accomplish points a) and b)? Thanks.

mercmobily’s picture

Hi,

SOrry, I am really not sure about a) and b)...

Merc.

Javier López’s picture

Don't worry, I have already managed to have a) and b), I just hacked a bit into "taxonomy.module" and "form.inc". I used optgroups on the select, one for each category, so the user can only selects subcategories. It is shown with a tabulation too.

Everything about categores and subcategories with the same name works fine now :)

mercmobily’s picture

Status: Postponed (maintainer needs more info) » Fixed

Hi,

OK. WIll leave this issue here as "fixed" for future reference to others.

Merc

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.