It could be very nice to use this syntax in addition to current one:

api.module|"The API module"

so if the pipe character is present after the matching pattern, the following text is used as the text for the link, instead of the project name.

CommentFileSizeAuthor
#2 custom_title.patch1.62 KBjonhattan

Comments

z.stolar’s picture

Yes it would!

I'd happily apply a patch, if one is supplied.

jonhattan’s picture

Status: Active » Needs review
StatusFileSize
new1.62 KB

so a patch is supplied :)

Note I'm not good at all with regexes. Anyway the tests I've made all have worked fine.

shadcn’s picture

I applied this patch to the 6 branch and it works. Thanks.

But after using it for some times, I find typing | and the quotes difficult and not really easy in terms of usability.

I think something like api.module(Api module) is easier.

What do you think?

z.stolar’s picture

After a second thought, I tend to not agree with this addition. This module is simple to use, and does a fairly good work at what it's aimed to do.
I feel that adding complexity (a.k.a. features) to it may damage it's ease of use.
Of course - I guess using this syntax won't be compulsory, but still - simplicity has it's advantage.

In any case - I'm not determining anything, just adding my 2 cents.

z.stolar’s picture

After a second thought, I tend to not agree with this addition. This module is simple to use, and does a fairly good work at what it's aimed to do.
I feel that adding complexity (a.k.a. features) to it may damage it's ease of use.
Of course - I guess using this syntax won't be compulsory, but still - simplicity has it's advantage.

In any case - I'm not determining anything, just adding my 2 cents.

shadcn’s picture

I have found some use cases for this, which make me want to go "for" this addition.

  1. Sometimes, a module name might not fit the context.
    eg. "To create complex layouts in Drupal, you should use this module" where "this" here would be a link to the panels page, as opposed to using the module name which will print Panels.
  2. Dopl has support to link to nodes as well, which is really helpful when you want to link to handbook pages. In this case, the whole title of the node is used. Same case as in 1 when you want to fit into the context and don't want to print the whole node title.

But I agree that too much features will make the module complex and harder to get into Drupal.org. I think if we can found a way to make this feature accessible and easy to use, it might be a good addition to the module.

Fight! :)

the_g_bomb’s picture

I think it would be far better gramatically, for readability, usability and all the other things we are supposed to care about if your sentence was to read: "To create complex layouts in Drupal, you should use the Panels module".

It is generally accepted now that the link text makes some sense when read out of context, otherwise you could end up with "To create a complex media gallery in Drupal, you should use this and this and this and this module and have the videos displayed using this module". Where the only way to know what is going on is to follow each link. That would get very annoying if browsing on a phone for example, not to mention if you printed the page for offline reading or had to use a screen reader.

IMHO A slight rewording of the sentence is a far better solution in that case.

shadcn’s picture

I seriously have no idea what you're talking about here. :)

The "this" here is merely an example, where one might want to replace the module name by something else.

the_g_bomb’s picture

I'm going to say I'm on the fence about this one, now. I've been thinking about it and each time I do I get a different answer. Today I can't decide. The other day I was obviously against the idea, thinking that that option shouldn't be there as it adds the ability to mess things up. I really like the simplicity of how things are at the moment, if they can stay the same while implementing this then great, it doesn't necessarily have to be used, but the option might be nice. But then who cares what I think, you guys have done a great job so far.

the_g_bomb’s picture

Issue summary: View changes
Status: Needs review » Fixed

It's been added to the latest branch

Status: Fixed » Closed (fixed)

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