Is it possible to address a single item of a field collection in pathauto? I'm making sort of a slideshow for a customer  

The slideshow has a field collection which has itself several fields that contain the actual content of the slides (headline, text, image, alt text, image caption)

And the slideshow is a node which uses several fields: title, teaser texts, teaser title texts, links to other pages etc.

The customer wants the slides to have individual URLs which I want to be created with pathauto module. The token which I use for a normal node (on admin/config/search/path/patterns) is like this [node:title]-[node:nid]. This works ok

But how about the token for a individual slide? If I administer the fields for my field collection (admin/structure/field-collections/field-pages/fields), there is no such default field like URL-alias.

Do I need to use the token hooks to create new tokens? But how? How can I then add them to the URL-alias? I suggest with hook_presave? Could it be done?
I managed it now like this in a custom module.
What I do is add a new argument to the system path, so
node/&lt;nid&gt; becomes node/&lt;nid&gt;/&lt;slide_num&gt;

Can it be made better?

/**
 * implements hook_pathauto_alias_alter()
 * alters the alias of a newly created slideshow node
 */
function coco_slideshow_pathauto_alias_alter(&amp;$alias, &amp;$context) {
        // print_r(array($alias, $context));
    if ($context['module'] == 'node' &amp;&amp; $context['type'] == 'slideshow'
        &amp;&amp; ($context['op'] == 'insert' 
            || $context['op'] == 'update')
        ) {
            $node = $context['data']['node'];

            module_load_include('inc', 'pathauto');
            module_load_include('inc', 'path');

            // get default path alias from patterns
            // this will be start of url alias
            $pattern = pathauto_pattern_load_by_entity('node', $node-&gt;type, $node-&gt;language);
            $path = pathauto_clean_alias(token_replace($pattern, array(
                'node' =&gt; $node,
            ), array(
                'sanitize' =&gt; false,
                'clear' =&gt; FALSE,
                'callback' =&gt; 'pathauto_clean_token_values',
                'language' =&gt; (object) array('language' =&gt; $node-&gt;language),
                'pathauto' =&gt; TRUE,
            )));

            $pages = field_get_items('node', $node, 'field_pages');
            if (!empty($pages)) {
                $slide_id = $pages[0]['value'];
                $slide = field_collection_item_load($slide_id);
                if (!empty($slide)) {       
                    $headline = field_get_items('field_collection_item', $slide, 'field_slide_headline');
                    $headline_text = $headline[0]['safe_value'];
                    if (!empty($headline)) {
                        $path_text = pathauto_cleanstring("{$headline_text} {$slide_id}");
                        // alias is replaced with new one
                        $alias = "{$path}-{$path_text}";
                    }
                }
            }
    }

}


/**
 * implements hook_node_insert()
 * 
 * creates aliases for each slide in slideshow node type
 */
function coco_slideshow_node_insert($node) {
    if ($node-&gt;type == 'slideshow') {
        module_load_include('inc', 'pathauto');
        module_load_include('inc', 'path');

        $title = $node-&gt;title;
        $nid = $node-&gt;nid;

        // get default path alias from patterns
        // this will be start of url alias
        $pattern = pathauto_pattern_load_by_entity('node', $node-&gt;type, $node-&gt;language);
        $path = pathauto_clean_alias(token_replace($pattern, array(
            'node' =&gt; $node,
        ), array(
            'sanitize' =&gt; TRUE,
            'clear' =&gt; TRUE,
            'callback' =&gt; 'pathauto_clean_token_values',
            'language' =&gt; (object) array('language' =&gt; $node-&gt;language),
            'pathauto' =&gt; TRUE,
        )));


        $pages = field_get_items('node', $node, 'field_pages');
        if (!empty($pages)) {
            $slides = field_collection_item_load_multiple($pages);
            if (!empty($slides)) {



                $i=0;
                foreach ($slides as $slide_id =&gt; $slide) {
                    $headline = field_get_items('field_collection_item', $slide, 'field_slide_headline');
                    if (!empty($headline)) {
                        $headline_text = $headline[0]['safe_value'];

                        // create clean string for pathauto for every single slide
                        // this will be second part of url alias
                        $path_text = pathauto_cleanstring("{$headline_text} {$slide_id}");

                        // first slide should alias to node/&lt;nid&gt; 
                        // not to node/&lt;nid&gt;/&lt;slide_id&gt;
                        // this is handled in hook_pathauto_alias_alter
                        if ($i &gt; 0) {
                            $save = array(
                                'source' =&gt; "node/{$nid}/{$i}",
                                'alias' =&gt; "{$path}-{$path_text}",
                                'language' =&gt; $node-&gt;language,
                            );
                            path_save($save);
                        }
                    }
                    $i++;
                }
            }
        }
    }
}

/**
 * implements hook_node_update
 */

function coco_slideshow_node_update($node) {
    if ($node-&gt;type == 'slideshow') {
        module_load_include('inc', 'pathauto');
        module_load_include('inc', 'path');

        $title = $node-&gt;title;
        $nid = $node-&gt;nid;

        // get default path alias from patterns
        // this will be start of url alias
        $pattern = pathauto_pattern_load_by_entity('node', $node-&gt;type, $node-&gt;language);
        $path = pathauto_clean_alias(token_replace($pattern, array(
            'node' =&gt; $node,
        ), array(
            'sanitize' =&gt; TRUE,
            'clear' =&gt; TRUE,
            'callback' =&gt; 'pathauto_clean_token_values',
            'language' =&gt; (object) array('language' =&gt; $node-&gt;language),
            'pathauto' =&gt; TRUE,
        )));


        $pages = field_get_items('node', $node, 'field_pages');
        if (!empty($pages)) {
            $slides = field_collection_item_load_multiple($pages);
            if (!empty($slides)) {



                $i=0;
                foreach ($slides as $slide_id =&gt; $slide) {
                    $headline = field_get_items('field_collection_item', $slide, 'field_slide_headline');
                    if (!empty($headline)) {
                        $headline_text = $headline[0]['safe_value'];

                        // create clean string for pathauto for every single slide
                        // this will be second part of url alias
                        $path_text = pathauto_cleanstring("{$headline_text} {$slide_id}");

                        // first slide should alias to node/&lt;nid&gt; 
                        // not to node/&lt;nid&gt;/&lt;slide_id&gt;
                        // this is handled in hook_pathauto_alias_alter
                        if ($i == 0) {
                            $save = array(
                                'source' =&gt; "node/{$nid}",
                                'alias' =&gt; "{$path}-{$path_text}",
                                'language' =&gt; $node-&gt;language,
                            );
                            $temp = drupal_get_path_alias("node/{$nid}", $node-&gt;language);
                            path_delete(array('alias' =&gt; $temp));
                            // print '&lt;xmp&gt;' . print_r($save,1). '&lt;/xmp&gt;';
                            path_save($save);
                        } else {
                            $save = array(
                                'source' =&gt; "node/{$nid}/{$i}",
                                'alias' =&gt; "{$path}-{$path_text}",
                                'language' =&gt; $node-&gt;language,
                            );
                            path_delete(array('source' =&gt; "node/{$nid}/{$id}"));
                            path_save($save);
                        }
                    }
                    $i++;
                }
            }
        }
    }
}