{"id":21429404,"url":"https://github.com/nystudio107/routemap","last_synced_at":"2025-07-14T10:32:57.106Z","repository":{"id":57029571,"uuid":"101535262","full_name":"nystudio107/routemap","owner":"nystudio107","description":"DEPRECATED Returns a list of Craft/Vue/React route rules and entry \u0026 asset URLs for ServiceWorkers from Craft entries","archived":false,"fork":false,"pushed_at":"2019-01-01T23:35:59.000Z","size":29,"stargazers_count":27,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-07-15T14:35:11.444Z","etag":null,"topics":["craft-plugin","craftcms","react","routes","serviceworker","vue"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nystudio107.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-27T06:53:33.000Z","updated_at":"2023-07-15T14:35:11.445Z","dependencies_parsed_at":"2022-08-23T17:41:04.193Z","dependency_job_id":null,"html_url":"https://github.com/nystudio107/routemap","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nystudio107%2Froutemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nystudio107%2Froutemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nystudio107%2Froutemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nystudio107%2Froutemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nystudio107","download_url":"https://codeload.github.com/nystudio107/routemap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225970899,"owners_count":17553413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["craft-plugin","craftcms","react","routes","serviceworker","vue"],"created_at":"2024-11-22T22:17:38.537Z","updated_at":"2024-11-22T22:17:39.299Z","avatar_url":"https://github.com/nystudio107.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n\n# DEPRECATED\n\nThis Craft CMS 2.x plugin is no longer supported, but it is fully functional, and you may continue to use it as you see fit. The license also allows you to fork it and make changes as needed for legacy support reasons.\n\nThe Craft CMS 3.x version of this plugin can be found here: [craft-routemap](https://github.com/nystudio107/craft-routemap) and can also be installed via the Craft Plugin Store in the Craft CP.\n\n# Route Map plugin for Craft CMS\n\nReturns a list of Craft/Vue/React route rules and entry \u0026 asset URLs for ServiceWorkers from Craft entries\n\n## Installation\n\nTo install Route Map, follow these steps:\n\n1. Download \u0026 unzip the file and place the `routemap` directory into your `craft/plugins` directory\n2.  -OR- do a `git clone https://github.com/nystudio107/routemap.git` directly into your `craft/plugins` folder.  You can then update it with `git pull`\n3.  -OR- install with Composer via `composer require nystudio107/routemap`\n4. Install plugin in the Craft Control Panel under Settings \u003e Plugins\n5. The plugin folder should be named `routemap` for Craft to see it.  GitHub recently started appending `-master` (the branch name) to the name of the folder for zip file downloads.\n\nRoute Map works on Craft 2.4.x and Craft 2.5.x.\n\n## Route Map Overview\n\nRoute Map is a plugin to help bridge the routing gap between frontend technologies like Vue/React and Craft CMS. Using Route Map, you can define your routes in Craft CMS as usual, and use an XHR to get a list of the routes in JSON format for use in your Vue/React frontend (it converts `blog/{slug}` dynamic routes to `/blog/:slug`).\n\nThis allows you to create your routes dynamically in Craft CMS using the AdminCP, and have them translate automatically to your frontend framework of choice.\n\nRoute Map also assists with [ServiceWorkers](https://nystudio107.com/blog/service-workers-and-offline-browsing) by providing a list of all of the URLs on your Craft CMS site, or just the specific sections you're interested in. You can limit the URLs returned via any `ElementCriteriaModel` attributes, and Route Map can even return a list of URLs to all of the Assets that a particular Entry uses (whether in Assets fields, or embedded in Matrix/Neo blocks).\n\nThis allows you, for instance, to have a ServiceWorker that will automatically pre-cache the latest 5 blog entries on your site, as well as any images displayed on those pages, so that they will work with offline browsing.\n\nRoute Map maintains a cache of each requested set of URLs for excellent performance for repeated requests. This cache is automatically cleared whenever entries are created or modified.\n\n## Configuring Route Map\n\nThere's nothing to configure.\n\n## Using Route Map via XHR\n\n### Route Rules\n\nThe controller API endpoint `/admin/actions/routeMap/getAllRouteRules` will return all of your website's route rules in an associative array. By default, they are in Craft CMS format (e.g.: `blog/{slug}`):\n\n```\n{\n  \"notFound\": {\n    \"handle\": \"notFound\",\n    \"type\": \"single\",\n    \"url\": \"404\",\n    \"template\": \"404\"\n  },\n  \"blog\": {\n    \"handle\": \"blog\",\n    \"type\": \"channel\",\n    \"url\": \"blog\\/{slug}\",\n    \"template\": \"blog\\/_entry\"\n  },\n  \"blogIndex\": {\n    \"handle\": \"blogIndex\",\n    \"type\": \"single\",\n    \"url\": \"blog\",\n    \"template\": \"blog\\/index\"\n  },\n  \"homepage\": {\n    \"handle\": \"homepage\",\n    \"type\": \"single\",\n    \"url\": \"\\/\",\n    \"template\": \"index\"\n  }\n}\n```\n\nThe `format` URL parameter allows you to specify either `Craft` | `React` | `Vue` format for your URL routes. For example, the controller API endpoint `/admin/actions/routeMap/getAllRouteRules?format=Vue` will return the same route rules above, but formatted for `Vue`  (e.g.: `blog/:slug`):\n\n```\n{\n  \"notFound\": {\n    \"handle\": \"notFound\",\n    \"type\": \"single\",\n    \"url\": \"\\/404\",\n    \"template\": \"404\"\n  },\n  \"blog\": {\n    \"handle\": \"blog\",\n    \"type\": \"channel\",\n    \"url\": \"\\/blog\\/:slug\",\n    \"template\": \"blog\\/_entry\"\n  },\n  \"blogIndex\": {\n    \"handle\": \"blogIndex\",\n    \"type\": \"single\",\n    \"url\": \"\\/blog\",\n    \"template\": \"blog\\/index\"\n  },\n  \"homepage\": {\n    \"handle\": \"homepage\",\n    \"type\": \"single\",\n    \"url\": \"\\/\",\n    \"template\": \"index\"\n  }\n}\n```\n\nNote that `blog\\/{slug}` was changed to `blog\\/:slug`. This allows you to easily map both static and dynamic Craft CMS routes to your router of choice.\n\nIf you want just the route rules for a particular section, you can use the controller API endpoint `/admin/actions/routeMap/getSectionRouteRules?section=blog` (note the required `section` parameter that specifies the Section handle you want):\n\n```\n{\n  \"handle\": \"blog\",\n  \"type\": \"channel\",\n  \"url\": \"blog\\/{slug}\",\n  \"template\": \"blog\\/_entry\"\n}\n```\n\nYou can also pass in the optional `format` parameter to get route rules from a specific section, in a particular format via the controller API endpoint `/admin/actions/routeMap/getSectionRouteRules?section=blog\u0026format=Vue`\n\n```\n{\n  \"handle\": \"blog\",\n  \"type\": \"channel\",\n  \"url\": \"blog\\/:slug\",\n  \"template\": \"blog\\/_entry\"\n}\n```\n\n### Entry URLs\n\nThe controller API endpoint `/admin/actions/routeMap/getAllUrls` will return a list of _all_ of the URLs to all of the Entries on your website:\n\n```\n[\n  \"http:\\/\\/nystudio107.dev\\/404\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/a-gulp-workflow-for-frontend-development-automation\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/making-websites-accessible-americans-with-disabilities-act-ada\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/static-caching-with-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/the-case-of-the-missing-php-session\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/so-you-wanna-make-a-craft-3-plugin\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/a-b-split-testing-with-nginx-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/mobile-testing-local-dev-sharing-with-homestead\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/simple-static-asset-versioning\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/tags-gone-wild\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/local-development-with-vagrant-homestead\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/mitigating-disaster-via-website-backups\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/web-hosting-for-agencies-freelancers\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/implementing-critical-css\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/autocomplete-search-with-the-element-api-vuejs\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/json-ld-structured-data-and-erotica\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/craft-3-beta-executive-summary\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/prevent-google-from-indexing-staging-sites\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/loadjs-as-a-lightweight-javascript-loader\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/creating-a-content-builder-in-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/service-workers-and-offline-browsing\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/using-phpstorm-with-vagrant-homestead\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/frontend-dev-best-practices-for-2017\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/using-systemjs-as-javascript-loader\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/a-better-package-json-for-the-frontend\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/modern-seo-snake-oil-vs-substance\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/lazy-loading-with-the-element-api-vuejs\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/installing-mozjpeg-on-ubuntu-16-04-forge\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/a-pretty-website-isnt-enough\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/using-vuejs-2-0-with-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/image-optimization-project-results\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/database-asset-syncing-between-environments-in-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/hardening-craft-cms-permissions\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/multi-environment-config-for-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/google-amp-should-you-care\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/creating-optimized-images-in-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/the-craft-cache-tag-in-depth\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/twig-processing-order-and-scope\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/stop-using-htaccess-files-no-really\",\n  \"http:\\/\\/nystudio107.dev\\/blog\",\n  \"http:\\/\\/nystudio107.dev\\/\"\n]\n```\n\nYou can retrieve just the entries for a particular section via the controller API endpoint `/admin/actions/routeMap/getSectionUrls?section=blog` (note the required `section` parameter that specifies the Section handle you want):\n\n```\n[\n  \"http:\\/\\/nystudio107.dev\\/blog\\/a-gulp-workflow-for-frontend-development-automation\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/making-websites-accessible-americans-with-disabilities-act-ada\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/static-caching-with-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/the-case-of-the-missing-php-session\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/so-you-wanna-make-a-craft-3-plugin\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/a-b-split-testing-with-nginx-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/mobile-testing-local-dev-sharing-with-homestead\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/simple-static-asset-versioning\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/tags-gone-wild\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/local-development-with-vagrant-homestead\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/mitigating-disaster-via-website-backups\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/web-hosting-for-agencies-freelancers\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/implementing-critical-css\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/autocomplete-search-with-the-element-api-vuejs\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/json-ld-structured-data-and-erotica\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/craft-3-beta-executive-summary\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/prevent-google-from-indexing-staging-sites\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/loadjs-as-a-lightweight-javascript-loader\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/creating-a-content-builder-in-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/service-workers-and-offline-browsing\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/using-phpstorm-with-vagrant-homestead\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/frontend-dev-best-practices-for-2017\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/using-systemjs-as-javascript-loader\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/a-better-package-json-for-the-frontend\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/modern-seo-snake-oil-vs-substance\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/lazy-loading-with-the-element-api-vuejs\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/installing-mozjpeg-on-ubuntu-16-04-forge\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/a-pretty-website-isnt-enough\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/using-vuejs-2-0-with-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/image-optimization-project-results\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/database-asset-syncing-between-environments-in-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/hardening-craft-cms-permissions\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/multi-environment-config-for-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/google-amp-should-you-care\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/creating-optimized-images-in-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/the-craft-cache-tag-in-depth\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/twig-processing-order-and-scope\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/stop-using-htaccess-files-no-really\"\n]\n```\n\nBoth of the above controller API endpoints support an optional `attributes` parameter that lets you pass in an array of `ElementCriteriaModel` attribute key/value pairs to be used to refine the Entries selected.\n\nFor instance, if you wanted just the most recent 5 Entries from the `blog` section, you'd use the controller API endpoint `/admin/actions/routeMap/getSectionUrls?section=blog\u0026attributes[limit]=5`:\n\n```\n[\n  \"http:\\/\\/nystudio107.dev\\/blog\\/a-gulp-workflow-for-frontend-development-automation\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/making-websites-accessible-americans-with-disabilities-act-ada\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/static-caching-with-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/the-case-of-the-missing-php-session\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/so-you-wanna-make-a-craft-3-plugin\"\n]\n```\n\nOr if you wanted the 5 oldest Entries from the `blog` section, you'd use the controller API endpoint `/admin/actions/routeMap/getSectionUrls?section=blog\u0026attributes[limit]=5\u0026attributes[order]=postDate asc`:\n\n```\n[\n  \"http:\\/\\/nystudio107.dev\\/blog\\/stop-using-htaccess-files-no-really\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/twig-processing-order-and-scope\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/the-craft-cache-tag-in-depth\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/creating-optimized-images-in-craft-cms\",\n  \"http:\\/\\/nystudio107.dev\\/blog\\/google-amp-should-you-care\"\n]\n```\n\n### Entry URL Assets\n\nThe controller API endpoint `/admin/actions/routeMap/getUrlAssetUrls?url=/blog/tags-gone-wild` will return all of the image Assets from the Entry with the URI of `/blog/tags-gone-wild`, whether in Assets fields, or embedded in Matrix/Neo blocks (note the required `url` parameter that specifies the URL to the entry you want):\n\n```\n[\n  \"http:\\/\\/nystudio107.dev\\/img\\/blog\\/buried-in-tag-manager-tags.jpg\",\n  \"http:\\/\\/nystudio107.dev\\/img\\/blog\\/they-told-two-friends.png\",\n  \"http:\\/\\/nystudio107.dev\\/img\\/blog\\/tag-manager-tags-gone-wild.png\",\n  \"http:\\/\\/nystudio107.dev\\/img\\/blog\\/google-chrome-activity-indicator.png\",\n  \"http:\\/\\/nystudio107.dev\\/img\\/blog\\/tag-javascript-executing.png\",\n  \"http:\\/\\/nystudio107.dev\\/img\\/blog\\/tags-are-prescription-drugs.jpg\",\n  \"http:\\/\\/nystudio107.dev\\/img\\/blog\\/taming-tags-whip.jpg\"\n]\n```\n\nEither a full URL or a partial URI can be passed in via the `url` parameter.\n\nBy default, it only returns Assets of the type `image` but using the optional parameter `assetTypes` you can pass in an array of the types of Assets you want returned. For instance, if we wanted `image`, `video`, and `pdf` Assets returned, we'd use the controller API endpoint `/admin/actions/routeMap/getUrlAssetUrls?url=/blog/tags-gone-wild\u0026assetTypes[0]=image\u0026assetTypes[1]=video\u0026assetTypes[2]=pdf'`.\n\n## Using Route Map in your Twig Templates\n\nYou can also access any of the aforementioned functionality from within Craft CMS Twig templates.\n\n### Route Rules\n\nTo get all of your website's route rules:\n\n```\n{% set routeRules = craft.routeMap.getAllRouteRules() %}\n```\n\nTo specify the format that the route rules should be returned in, pass in either `Craft` | `React` | `Vue`:\n\n```\n{% set routeRules = craft.routeMap.getAllRouteRules('Vue') %}\n```\n\nTo get route rules from only a specific section (such as `blog`, in this case), pass in the Section handle:\n\n```\n{% set routeRules = craft.routeMap.getSectionRouteRules('blog') %}\n```\n\nYou can also pass in the optional `format` parameter to get route rules from a specific section, in a particular format:\n\n```\n{% set routeRules = craft.routeMap.getSectionRouteRules('blog', 'Vue') %}\n```\n\n### Entry URLs\n\nTo get all of your website's public Entry URLs:\n\n```\n{% set urls = craft.routeMap.getAllUrls() %}\n```\n\nTo refine the URLs returned, you can pass in optional `ElementCriteriaModel` attributes via key/value pairs:\n\n```\n{% set urls = craft.routeMap.getAllUrls({'limit': 5}) %}\n```\n\nor\n\n```\n{% set urls = craft.routeMap.getAllUrls({'limit': 5, 'order': 'postDate asc'}) %}\n```\n\nTo get URLs from just a specific Section:\n\n```\n{% set urls = craft.routeMap.getSectionUrls('blog') %}\n```\n\nTo refine the URLs returned, you can pass in optional `ElementCriteriaModel` attributes via key/value pairs:\n\n```\n{% set urls = craft.routeMap.getSectionUrls('blog', {'limit': 5}) %}\n```\n\nor\n\n```\n{% set urls = craft.routeMap.getSectionUrls('blog', {'limit': 5, 'order': 'postDate asc'}) %}\n```\n\n### Entry URL Assets\n\nTo get all of the Asset URLs in a particular Entry (whether in Assets fields or embedded in Matrix/Neo blocks) by passing in a URL or URI to the entry:\n\n```\n{% set urls = craft.routeMap.getUrlAssetUrls('/blog/tags-gone-wild') %}\n```\n\nBy default, it returns only Assets of the type `image`. You can pass in an optional array of Asset types you want returned:\n\n```\n{% set urls = craft.routeMap.getUrlAssetUrls('/blog/tags-gone-wild', ['image', 'video', 'pdf']) %}\n```\n\n## Using Route Map from your Plugins\n\nThe `craft()-\u003erouteMap` service gives you access to all of the functions mentioned above via your plugins.\n\n### Route Rules\n\nTo get all of your website's route rules:\n\n```\n$routeRules = craft()-\u003erouteMap-\u003egetAllRouteRules();\n```\n\nTo specify the format that the route rules should be returned in, pass in either `Craft` | `React` | `Vue`:\n\n```\n$routeRules = craft()-\u003erouteMap-\u003egetAllRouteRules('Vue');\n```\n\nTo get route rules from only a specific section (such as `blog`, in this case), pass in the Section handle:\n\n```\n$routeRules = craft()-\u003erouteMap-\u003egetSectionRouteRules('blog');\n```\n\nYou can also pass in the optional `format` parameter to get route rules from a specific section, in a particular format:\n\n```\n$routeRules = craft()-\u003erouteMap-\u003egetSectionRouteRules('blog', 'Vue');\n```\n\n### Entry URLs\n\nTo get all of your website's public Entry URLs:\n\n```\n$urls = craft()-\u003erouteMap-\u003egetAllUrls();\n```\n\nTo refine the URLs returned, you can pass in optional `ElementCriteriaModel` attributes via key/value pairs:\n\n```\n$urls = craft()-\u003erouteMap-\u003egetAllUrls(array('limit' =\u003e 5));\n```\n\nor\n\n```\n$urls = craft()-\u003erouteMap-\u003egetAllUrls(array('limit' =\u003e 5, 'order' =\u003e 'postDate asc'));\n```\n\nTo get URLs from just a specific Section:\n\n```\n$urls = craft()-\u003erouteMap-\u003egetSectionUrls('blog');\n```\n\nTo refine the URLs returned, you can pass in optional `ElementCriteriaModel` attributes via key/value pairs:\n\n```\n$urls = craft()-\u003erouteMap-\u003egetSectionUrls('blog', array('limit' =\u003e 5));\n```\n\nor\n\n```\n$urls = craft()-\u003erouteMap-\u003egetSectionUrls('blog', array('limit' =\u003e 5, 'order' =\u003e 'postDate asc'));\n```\n\n### Entry URL Assets\n\nTo get all of the Asset URLs in a particular Entry (whether in Assets fields or embedded in Matrix/Neo blocks) by passing in a URL or URI to the entry:\n\n```\n$urls = craft()-\u003erouteMap-\u003egetUrlAssetUrls('/blog/tags-gone-wild');\n```\n\nBy default, it returns only Assets of the type `image`. You can pass in an optional array of Asset types you want returned:\n\n```\n$urls = craft()-\u003erouteMap-\u003egetUrlAssetUrls('/blog/tags-gone-wild', array('image', 'video', 'pdf'));\n```\n\n## Route Map Roadmap\n\nSome things to do, and ideas for potential features:\n\n* Add support for Category Groups / Category URLs\n* Add support for Commerce Products / Variant URLs\n* Add support for multiple locales\n\nBrought to you by [nystudio107](https://nystudio107.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnystudio107%2Froutemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnystudio107%2Froutemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnystudio107%2Froutemap/lists"}