Clean URLs
From Morfikwiki.com
Clean URLs are an exciting new feature of Morfik 2.0.4 that allows users to access your website using elegant, easy-to-remember URLs.
Contents |
[edit] Publishing a Clean URL
To demonstrate the Clean URL concept, we will use the Blog xapp. (The Blog xapp shipped with Morfik version 1, and is available for download from labs.morfik.com).
In addition to its main page that displays the blog posts, the Blog xapp has an admin section. We can make a clean URL for the admin section by doing the following:
- Open the Index form.
- Select the FullSite subform.
- Set FullSite's Form property to AdminMain.
- Run the Publish Page command. (Tip: the Publish Page command is only visible when the Form object is selected. To select the Form object, click in the workspace behind the form.)
- In the Publish Page dialog, enter the title by which this page will be known.
Now, when the Blog xapp is running, it is possible to go directly to the admin section by typing: http://127.0.0.1:9119/admin
[edit] Publishing a Clean URL with Parameters
Clean URLs can also be used with parametric forms.
We can make a clean URL that displays individual blog posts by doing the following:
- Open the Index form, and set the Form property of the subform FullSite to BlogMain.
- Open the BlogMain form, and set the Form property of the subform MainArticleArea to ViewOneArticle.
- Open the Publish Page dialog.
- Enter the Page Name 'articles'
- Move the parameter ParamId to the Page Parameters list.
Now, when the Blog xapp is running, it is possible to go directly to, say, the second blog post by typing: http://127.0.0.1:9119/articles/2
[edit] Editing or Removing Published Pages
In order to manage published pages that you have added to your project, Morfik provides the Published Pages dialog. This is accessed via the Project tab of the ribbon.
The Published Pages dialog allows you to edit or remove any published page in your project.





