0

I created a content type using views called Bars & Restaurants

I want that content type to show under my Bars & Restaurants menu link at the top of my page.

I have changed the path to http://localhost/drupal/barsandrestaurants

and the menu to: menu tab - navigation and it still only shows up on my home page.

Is there a way to display the content type only on my bars and restaurants page?

I want authenticated users to be able to go into the page and add bars and restaurants themselves.

I am very new to drupal so any help will be great!

enter image description here

I want the content that Im adding to be under the Bars & Restaurants page there

1
  • Actually, you cannot create a content type using the Views module. It's the Node module that allows you to create a content type.
    – apaderno
    Feb 20, 2017 at 20:19

1 Answer 1

0

Assuming what you want to do is :

  • Make a content type which authenticated user can add by themselves called barandrestaurant.
  • Make a view displaying all the barandrestaurant content-type.

First creat a new content type called barandrestaurant :

  1. You should unchecked the "promote to front page" in the content type page : enter image description here
  2. Allow user to add your content type in admin/people/permission --> find your content type node name (barandrestaurant) and allow authenticated user to create new content.

Second make a view page filtering your content type barandrestaurant

  1. Go to admin/structure/views/add a new view and fill the form to filter on your content type like that :enter image description here

  2. Specifiy that what you want is a view page and that you want to add a menu link in navigation menu :enter image description here

  3. Add in the header or in the footer (as you want) a "global text area" with a html link to create new barandrestaurant content type page :

    <div><a href="node/add/barandrestaurant">Add a new bar or restaurant</a></div>
    

    This should look like this :enter image description here

Now you should have a content type called barandrestaurant which can be created by your authenticated users visiting the link http://www.yoursite.com/bar-and-restaurant. The link should be in your navigation menu too.

8
  • Aporie has it mostly right. When creating the new content type called barandrestaurant you should untick all Available Menus. The View would be in the menu, not the actual nodes.
    – Gold
    Feb 20, 2017 at 20:23
  • Thank you for the answer.. However, I already have a basic page created called Bars & Restaurants. Is there a way to set the content of the view to be displayed only on that page? Or do I need to create a new page ? The Basic Page is one of my main pages beside Home so would like the content to be displayed only there. Feb 20, 2017 at 20:37
  • I have edited my question and added a picture to explain it better Feb 20, 2017 at 20:50
  • So that's actually very close to what I said. You have to have a view filtering on the content type bar&restaurant. Are you sure, that's only the content you are adding under bard&restaurant content type that you want to be displayed or every content user posted under bar&restaurant ?
    – Aporie
    Feb 20, 2017 at 21:00
  • Well I want users to be able to add restaurands and bars only on that page if you know what I mean? .. And where would I specify that I want the content to be saved on this page localhost/drupal/barsandrestaurants ? Feb 20, 2017 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.