• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.LATER
    • None
    • Services
    • None
    • 2 - Long term
    • 4 - Structuring

      When declaring a service, a URL is specified and cannot change, nor be assigned parameters.
      Let's say I have a service declared in "myplugin" with "service.html" as its internal URL, with an optional "page" parameter. When I open the page it's inserted in ("My Page"), I get the URL "http://my.site/fr/my-page.html".
      If I want to browse the second page, the URL becomes:

      • either "http://my.site/fr/my-page.html?page=2", and the service is not cacheable.
      • or "http://my.site/fr/_plugins/myplugin/template/service/page2.html", for instance (if "service/page*.html" is my matcher), which is a plugin URL.

      Even if the second case makes the service cacheable, there are several drawbacks as well:

      • it's not a page URL, so we have no breadcrumbs, no filters, etc.
      • the URL is horribly dirty and does not reflect the sitemap at all.

      I would like to be able to have an URL like "http://my.site/fr/my-page/page2.html", which is a clean URL, is perfectly cacheable, and reflects the physionomy of the sitemap.
      Of course, it's currently not possible, because this URL is part of the page URL space. Maybe defining a different URL space like "http://my.site/fr/my-page/_page2.html" could solve the problem?

          [CMS-2904] Service URIs improvements

          or "http://my.site/fr/my-page_ID.html"
          the problem is that ID has to be shared between all services in the page !

          we could imagine the following solution :
          the service do call the same url with _UNIQUEIDENTIFIER + ?paramformyservice=values
          so the page will be cachable and the small unique identifier does not need to reflect all param value (it could be a hash code of them)

          ex:
          if you go on page 2 of my service, I build a hashcode based on my zoneitem and the my parameter (page 2) e.g. N2352
          Then I call the page fr/page_N2352.html?page=2
          The first time the parameter is used to build the cache and ignored the second time

          Raphaël Franchet added a comment - or "http://my.site/fr/my-page_ID.html" the problem is that ID has to be shared between all services in the page ! we could imagine the following solution : the service do call the same url with _UNIQUEIDENTIFIER + ?paramformyservice=values so the page will be cachable and the small unique identifier does not need to reflect all param value (it could be a hash code of them) ex: if you go on page 2 of my service, I build a hashcode based on my zoneitem and the my parameter (page 2) e.g. N2352 Then I call the page fr/page_N2352.html?page=2 The first time the parameter is used to build the cache and ignored the second time

          This could be used, for instance, to avoid passing the zone item ID to the RSS URL, which is like "/plugins/web/zoneItem/57b068b5-3f39-410c-b916-c8ce9d89cec9/rss.xml" and could become "page/rss.xml".
          Of course, a way to represent the specific zone item in the page should be found.

          Nicolas Gavalda (Inactive) added a comment - This could be used, for instance, to avoid passing the zone item ID to the RSS URL, which is like "/plugins/web/zoneItem/57b068b5-3f39-410c-b916-c8ce9d89cec9/rss.xml" and could become "page/rss.xml". Of course, a way to represent the specific zone item in the page should be found.

            Unassigned Unassigned
            ngavalda Nicolas Gavalda (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: