Hello Drupal enthusiasts,
I have a menu structure, which has its equivalent in url paths. Example: department/area/project. This path works fine and now I want to attach some View when last part of url is "releases" (department/area/project/releases).
Any ideas? Should I rather take closer look at Views options or some other module (Pages?) or programatically by hook_menu and some wildcards?
========================================================= EDIT (thanks to lack of ability of answering my own question): I think I figured out something close to what I need. I create View, type Attachment (thanks to EVA module). I configure contextual filter, and specify validation criteria with PHP code pasted to UI of Views:
$path_arr = drupal_get_destination();
$path_str = $path_arr["destination"];
$path_explode = explode("/", $path_str);
$path_last = end($path_explode);
if( $path_last == "releases" ) {
return true;
}
And after that the certain view would be shown in case of last part of path equal to releases. Now some ENTITY CONTENT SETTINGS to cover only selected content type.
If function arg would accept -1 this could be done as fast as
if(arg(-1)=="releses") { ... }.
How about performance of such a solution? Is it much slowing down the whole thing?