Synopsis

Do you has ever happened to have to retrieve the title of a node over the arguments in views? Or to generate a view with a legible url?

With Views slug title, you will easily be able to use the title of your node as arguments.

This module includes a field similar to "URL path settings" except that views slug title generates only the title.

The character will be replaced or deleted based on the settings configured in "alias url".

In views, a contextual filter widget is available and allows you to associate for you, automatically, the "slug" to the node. It is also available as a single field in order to re-write an url, for example, in a node list.

The field is available only for nodes and does not yet work for other entities.

This module is based and inspired Slug module. This adds a machine name to all entities in drupal.

Requirements

Git

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/niknak/2418497.git views_slug_title
cd views_slug_title

Project page

  • Slug add a machine name to all entities in drupal, but not supported by views
CommentFileSizeAuthor
views_slug_title.png54.33 KBniknak

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxniknak2418497git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

Timusan’s picture

Hi Niknak

An automated review (seen here) shows a few (maybe) show-stopping issues:

  1. There is no REAMDE file included (either *.md or *.txt format). It is good practice to include a README for helping user along with your module. See here for a template
  2. There is a LICENSE.txt file included, as per Drupal licensing guidelines this has to be removed.
  3. There seems to be a lot of cursing against Drupal's coding standards (about 70+ errors). It is best to fix the major ones as adhering to these standards make for consist module code so other developers can easily step in and the quality of the code is somewhat protected. See the automated review link for a full list of the errors.

My manual review:

It may also be of use to include a hook_help() in your views_slug_title.module file that refers to your yet-to-be written README inside of Drupal (the module overview page). See here for more details.

Next, I installed the module which gave no errors, yet I am unable to find the functionality you described. I get no extra vertical tab (as shown in your screenshot) on my content types (also net one newly created ones). There are also no extra widgets or filters available to me in Views. I tried with a new, field based View of a simple node type. I maybe missing something?

Although, the latter may have to do with the fact that you mis-implemented the hook_views_data_alter(). In your views file, you implemented it as slug_views_data() instead of views_slug_title_views_data_alter(&$data) (no _alter, no views_slug_title_ module name prefix and no data variable passed in by reference). You should not initialize your empty $data array (it is already passed in). After I manually altered this, I could select the contextual "slug" filter.

Also, your filter implementation (slug_handler_filter_slug.inc) is a stub, which explains why I cannot find the filter as well. Your forgot to commit this code?

And as a final note, just pondering, but as you mentioned yourself the slug module does part of this functionality ... is it not a better idea to collaborate with the developer of slug to include Views functionality? Simply to avoid to much overlap.

niknak’s picture

Issue summary: View changes
Status: Needs work » Needs review

I fix the problem issued by "pareview" and re-verify the use of the module. Before, I did not specify "entity api" as requirements module.

darol100’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

@niknak,

Seem to be like a duplication. Can you explain to me what are the different between this module and pathauto nor the slug module? As we change our project application process in #2453587: [policy, no patch] Changes to the project application review process we are not allowed to block applications base on module duplication. We can still recommend collaboration over competition, but we should not enforce it. So that said... would not be better to provide a patch to the slug module instead ?

You should add the hook_help.

Pareview and Coder did not show any errors. I would change it to RTCB; however, you should consider providing this as a patch instead of their own project.

cweagans’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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