Can we get a Content Type Path Filter like have in FCKediteor.
Example
Path structure: content_type@path.element_id
or content_type@path.*
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | visibility_api_check_request_q.patch | 961 bytes | sdsheridan |
Can we get a Content Type Path Filter like have in FCKediteor.
Example
Path structure: content_type@path.element_id
or content_type@path.*
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | visibility_api_check_request_q.patch | 961 bytes | sdsheridan |
Comments
Comment #1
q0rban commentedSorry I'm just now responding to this, I realized I wasn't subscribed to issues on this module! ;)
So, can you describe more what you're talking about? You want to be able to, say, hide things depending on which node type you're looking at, but not use php code?
Edit: Realized my logic was incorrect.
Comment #2
bsztreha commentedIs there any activity? I need some similar feature at region_visibility, hide region if view node type of foo.
Comment #3
q0rban commentedHonestly, I think this module is deprecated. If you need a way to control the visibilty of certain things, depending on conditions, you should probably be using Context module.
Comment #4
sdsheridanThis does provide a nice simple interface, though, and is relatively light-weight.
I solved this problem in a slightly different way, which was to also look at
$_REQUEST['q']when doing the comparison in function visibility_api_visible. For certain valid patterns,drupal_get_path_alias($_GET['q'])won't retrieve a valid aliased path, particularly if there is a sub-path alias being used. So, I changed the function to also incorporate the test of$_REQUEST['q']as follows:How this helps is that I have via pathauto URLs that start with a content type, and I also use subpath_alias, so the links to edit a content type, for example, would look like
content_type_machine_name/[title-raw]/edit. With the change above, I can use a pattern likecontent_type_machine_name/*/edit, and it works.I've attached a patch.
Shawn