Anker for modules on Rachel HOME

I often use references to one specific learning module on our server (online and offline)
How could we make it possible to create a hyperlink to jump to the module on the RACHEL home page without scrolling through the entire list of modules?
Could somebody explain how to make named anker points on the RACHEL home structure?

Put the anchor in the rachel-index.php of the module I think

1 Like

If you want the anchor link in the top menu of the RACHEL interface you’ll need to do the following,

  1. Open /.data/RACHEL/rachel/index.php

  2. Add the link in the menu area, Your code should look like this after adding your module link

     <li><a href="index.php" target="_self"><?php echo strtoupper($lang['home']) ?></a></li>
     <li><a href="about.html" target="_self"><?php echo strtoupper($lang['about']) ?></a></li>
     <li><a href="#mymodule" target="_self">My Module</a></li>
  3. Open your module’s rachel-index.php for editing

  4. Add id=“mymodule” to the “indexmodule” div. Your rachel-index.php’s code should look something like this

    <!-- version=v2.1 -->
    <div class="indexmodule" id="mymodule">

When you click the link it should now take you to the module. The extra rachel-index step is required because modules don’t have a unique “id=” on them so there’s nothing to anchor to. You can change “mymodule” to anything you’d like as long as the index.php and rachel-index.php names match. I suggest using the name of the module.

1 Like