Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
145 views
in Technique[技术] by (71.8m points)

Display list in table or grid format in drupal

I am creating a simple site in drupal, in which i have several pages. I have that page called Notification as you can see in the sample image. First i want a feature by which Admin can upload some data like Name or title, A pdf file etc, any one who visits the site will go the page and click on any pdf link and download or view the pdf. I have tried Contents Types, Views for that purpose, but I am not able to achieve it as it got very confusing. Please any help would be appreciated.

enter image description here

The table like structure is what i want, its just done in paint. It will be helpful if anyone can provide a step by step guied to create this type of structure. The table will display latest n records uploaded by Admin.

question from:https://stackoverflow.com/questions/65932854/display-list-in-table-or-grid-format-in-drupal

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  1. First you need to create a new content type (e.g. Notification)

  2. Add field Description with type File for Notification content type (you can use base field Title of Node as Name so you don't need to create another one) enter image description here

  3. Create a View of content (e.g. Notification), then add fields and settings as below: enter image description here

  4. Add some Notification from Add content screen (/node/add/notification) enter image description here

  5. Result (Page /notification) enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...