Hi all.

I am finally started coding for Drupal. I am developing my own custom module. All admin are in place so now it is the front I need to take care of.

But I am unsure of which way to go now. I need to have the datapresented somehow. So I have 2 questions.

1. If I want to write my own "presentation", what about the path? I need to make sure it is not conflicting with others. What is the correct approach here ?

2. If I want to implement view-fields, how to write code that support views? I need to use LEFT JOIN's and also some of the fields are used twice with different output, like date()-format.

I actually prefer both, where I can provide my own "views" and also let people present data by them-selves.

Please forgive me if the questions are "stupid". I am new to Drupal-development. :)

Comments

RoloDMonkey’s picture

If you want to avoid path collisions, just use the module name as a prefix. For instance, the front-end of the node module uses paths like node/1, etc.

As for views, there are numerous tutorials for describing your tables for views. Here is just one: http://www.sitepoint.com/exposing-tables-views-drupal-7/

--

Read more at iRolo.net