Tag Archives: Drupal

Drupal – Limit the number of values of a content type field by role @ 2

Previous: Drupal – Limit the number of values of a content type field by role @ 1

Another way to limit the number of values of content type field is adding an extra validation on the node create/edit form. Assume we have a content type called center and a media field called field_center_video.
1. Create a custom module and add an extra validation. Continue reading Drupal – Limit the number of values of a content type field by role @ 2

Drupal 7 – Restrict Access by Role (403 Access Denied) for specific paths

Today i would like share another module about Drupal access permission. It is called Path Access.

With the help of the Empty Page module, i could create any blank templates with different blocks. But unlike Views page, these empty pages do not have access permission settings. Luckily the Path Access module could fill the gap.

If you have enabled the Path Access module, you can configure the forbidden paths for different roles @ admin/config/people/pathaccess.
Continue reading Drupal 7 – Restrict Access by Role (403 Access Denied) for specific paths

Drupal 7 – Render the Privatemsg send message form programmatically

Privatemsg allows Drupal users sending message to each other. It is a must-have feature of community oriented websites. The module includes all necessary features including inbox, outbox, user block list etc. In my case, i want to render the send message form on the user profile page. So i created a block which generate the send message form by PHP code and attached it to the user profile page. Here you are.
Continue reading Drupal 7 – Render the Privatemsg send message form programmatically

Drupal 7 – Modify the internal/system path of Taxonomy Terms

The default path of taxonomy term is taxonomy/term/[term-id]. Although we can now use term alias in Drupal 7, we may still want to change the internal path with a specific pattern. For example, i want to replace all the term page by a view which has term id as input parameter. In that case, i want to set the path of all terms to my-term-view/[term-id] instead of taxonomy/term/[term-id]. This could be done by using the Entity Path module.
Continue reading Drupal 7 – Modify the internal/system path of Taxonomy Terms