Hello,

I created attachment content type to be able to upload pdf files as the administrator of the school site, I have created a database table called 'Class' in drupal database.Now, I want to be able to assign those files to different classes in my class table.

how can I create the connection between those files and 'Class' user defined table in terms of the interface in the website? or I guess I am not sure how to expose a user defined table in the website interface , and if it is possible to connect drupal table with a user defined table ?

Comments

nevets’s picture

I would start by making a content type called class (I would not add my own table).

If the uploaded files are unique (not shared) between classes I would simple add a file file field to the 'class' content type. If they can be shared I would add an entity reference field to the 'class' content type and configure so it can reference content of type 'attachment'.

mwoot’s picture

thank you, I am going to try this as you suggested and see how it would work for me