Trongate Docs
switch to dark modeswitch to dark mode
Accessing Sub Modules Via The URL

Accessing Sub Modules Via The URL

The process of accessing super modules - either via the URL or via other modules - is entirely unchanged. So, nothing new to learn there! Just access your super modules the way you would normally access any normal Trongate modules.

Sub modules are a little different.

To access sub modules via the URL, prefix the first segment of the URL with the name of the parent module followed by a hyphen. For example, let's assume that we want to access our accessories sub module. More specifically, let's assume that we'd like to invoke the 'display()' method. We could invoke this by navigating to the URL:


This would, of course, be assuming that 'accessories' is inside a super module called 'cars'.

Creating Links

To create a text link that invokes the display() method, inside accessories, we could use the following code:

<?= anchor('cars-accessories/display', 'view accessories') ?>

Again, notice how the first segment of the URL contains the super module (in this case, 'cars') followed by a hyphen.


If you have a question or a comment relating to anything you've see here, please goto the Help Bar.