I have a content type that I am using in basically a support role. It won't appear on the site without being part of a view. Besides giving it a dummy URL, is there any way to actually remove URLs being generated for this content type?

I've searched, and haven't been able to find anything...



Nick.D’s picture

Anyone have any ideas?

zilla’s picture

you will be able to define a custom entity fully accessible in views, with all bundles and anything that may feel "like a node" but very useful where you want it to act like an item, as in, no comments or clear title, rather part of a list with specific fields (for example)

there's an overview on the project page: https://drupal.org/project/ECK

and a great tutorial walkthrough at: http://codekarate.com/daily-dose-of-drupal/drupal-7-entity-construction-kit

...this is sort of like hiding URL, since the idea is that you're only using the entity in some other representation and still want to use fields and everything else (including views specifically)

spovlot’s picture

All nodes have a URL of node/nid . Otherwise, you couldn't edit it. If you have Pathauto installed, you could create an obscure URL. Or you might want to set permissions so regular users don't have direct access to that type,

LoMo’s picture

Do instances of this content type actually have to be published for your use? If not, then you could have them unpublished and attempts to access their URLs (for normal users of the site) would not be successful and the content would not be listed in site maps, etc.

See you at the Drupalcon!

Ayesh’s picture

-- sorry --

// Ayesh

Nick.D’s picture

I fixed this unintentionally for now; Using pathauto, I left the default pattern blank. This makes it use node/nid... which isn't ideal, but it does get the job done for the most part.

I'll modify the permissions to make the content type inaccessible by all but admins. That should do the trick.

LoMo’s picture

I could be wrong, but I think that making the content type inaccessible to all but admin would also make the Views inaccessible by non-admin. Perhaps someone else can corroborate or if you have problems with this approach, you'll at least have a clue why and can look for a workaround. I've not done much with content access restrictions, myself (although others have implemented such controls on projects I was involved in). My intuition says that Views will also check the access restrictions, but there should be a way around this for your use case.

See you at the Drupalcon!

Andre-B’s picture

Views does check this restriction if you add a filter like "is published", if not it will just show up the way it is.

follow me on Twitter: https://twitter.com/ABaumeier