Note that there are some explanatory texts on larger screens.

plurals
  1. POdrupal module pages
    text
    copied!<p>I'm having a conceptual sort of roadblock. So, I'd like to make a custom Drupal module, with several different pages, each of which "does stuff". </p> <p>I'm not understanding how to make/integrate different pages into my module, and what their URLS would be. </p> <p>I do have this :</p> <pre><code> /* FILE : mymodule.module */ function mymodule_menu() { $items = array(); $items['mymodule/landingpage'] = array( 'page callback' =&gt; 'mymodule_landing', 'access arguments' =&gt; array('access content'), 'type' =&gt; MENU_NORMAL_ITEM, ); return $items; } function mymodule_landing() { $title = 'Hello World'; $content ='This is a simple Hello World Proof of Concept'; return theme_box($tile, $content); } </code></pre> <p>And when I go to <code>mysite.com/mymodule/landingpage</code>, I see the content generated by <code>mymodule_landing()</code>. </p> <p>But this doesn't seem like what I want to do because the content for <code>landingpage</code> is generated inside the <code>mymodule.module</code>, and it leaves me super confused about how I'd go about making my <code>mysite.com/mymodule/step2</code>, ... , <code>mysite.com/mymodule/step99</code> pages</p> <p>I have the gut feeling that the code for each page should be in it's own corresponding file, and I'm not understanding how to do it, this doesn't seem like the right way.</p> <p>Can you explain how I should be doing it, where the file should go (with my other module files, right?), and what URL it would be viewable at?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload