0

How to get a content type name out of view/views programmatically?

I have a view views_of_articles of (content type article), what I need is which hook I should to use to return the content type for each view.

In my case I want to return (article) from views_of_articles.

  • Your question is a bit too general to answer. Could you provide more info about the configuration of your view, and how the content type name you want to get relates to that? – Mrweiner Apr 15 at 0:53
  • @Mrweiner I edit my question – sam Apr 15 at 1:53
  • You still need to provide context, like what you're trying do. If you mean to pull the content type from a known pattern of views' machine names, you'd be able to do so from any of the view hook functions. – beltouche Apr 15 at 1:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.