Skip to content

output resource's ID to &itemTpl chunk #19

@a-unite

Description

@a-unite

To get more flexibility it could be great to have access to document's ID in &itemTpl chunk.

For example, I wanted to make sitemap.xml in this way: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=2620865. And then I needed access to resource's id to be sent to Babel plugin's snippet which I use already.

Another thing - Googlesitemap snippet used "full" schema in makeURL as default, while I needed "http" approach (where URL assembled with base_url (containing language shortcut i.e.) option for every frontend context).

It is as easy to add that feature as add one extra row to the googlesitemap.class.php source file (line 135)

            $output .= $this->getChunk($this->config['itemTpl'],array(
                'url' => $url,
                'date' => $date,
                'update' => $update,
                'priority' => $priority,
      'id'=> $id,

Thank you,
Ata

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions