Development

sfSiteMapPlugin

You must first sign up to be able to contribute.

This plugin build a module listing all the links for a given application ...

The plugin is based on the 'php reflection' feature. Browsing the module directory loading actions classes and get methods name, and then build all the links ...

Syntax

symfony sitemap [Application_Name] [Module_Name]

Note: If you launch the sitemap task again with the same Module_Name, the indexSuccess.php will be rename in indexSuccess.php.old and will be recreated.

Customization

don't forget that you can customize the indexSuccess.php in sfSiteMapPlugin\sitemap_module_skelton\module\templates\

in the template ##LINKS## represents the list of module/actions links ... your can add custom HTML to the skelton indexSuccess template ... and even your own dynamic variables:

for example ##MYTEST## somewhere in the skelton template and then add this to the $index_content array in sfSiteMapPlugin/data/tasks/sfPakeSiteMapPlugin.php as follows :

<?php
$mydate = date('Y-m-d');

  $index_content = array(
    'LINKS' => $template_content, // lists of links (link_to) previously build ...
    'MYTEST'=>$mydate
  );
?>

When you add new modules/actions to your application, you need to launch the task again (the old indexSuccess.php is renamed indexSuccess.old.php) the new indexSuccess.php is created based on the indexSuccess skelton

Things to do

* Ability to exclude module directories or actions from a list or a regular expression (given in config file)

* need enhancements in look'n'feel

* Store links labels in the actions classes : For example in the action class : $myactionLinkv='this is my link' and then by reflection we can can the link label for the corresponding action ... I don't know if this is the proper way to do that ...

Attachments