developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 11 years ago

Last modified 10 years ago

#767 closed enhancement (fixed)

External files for urls.xml

Reported by: laurentj Owned by: laurentj
Priority: high Milestone: Jelix 1.2 beta
Component: jelix:plugins:urls Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

At this time, when we integrate a module into an application, we have to include in the urls.xml all urls definitions. It is not really cool when we want to update a module, since we have to update also the urls.xml file.

So we could have a new element like this :

  <classicentrypoint ...>
    ...
      <includeurls  basepathinfo="foo/bar/" file="mymodule~urls.xml" />
   ...
  </classicentrypoint>

It says that the urls.xml file of the module "mymodule" defines urls for this module. And all of this urls will begin by foo/bar/.

The urls.xml of a module will have a different grammar : no 'entrypoint' element and no module attribute on url elements.

<moduleurls xmlns="...">
   <url pathinfo="user/edit"  action="default:edit">...</url>
</moduleurls>

In this example, the resulting defined url will be foo/bar/user/edit.

The urls definition files of a module could be store at the root of the module (near modules.xml for example).

Change History (3)

comment:1 Changed 11 years ago by laurentj

  • Documentation needed set
  • Resolution set to fixed
  • Status changed from new to closed

done. http://hg.jelix.org/jelix/jelix-trunk/rev/41e238fc1006

Syntax in the main urls.xml :

   <url pathinfo="/base/path" module="foo" include="urls.xml" />

It will declare all urls defined in the "urls.xml" file of the module foo, under the pathinfo /base/path. See urls.xml of some modules to know the syntax of such files declaring "sub urls".

comment:2 Changed 10 years ago by laurentj

  • Component changed from jelix:core to jelix:plugins:urls
Note: See TracTickets for help on using tickets.