How can I create more than one page from one page upstream using Moovweb?

I have one page, say:

http://en.wikipedia.org/wiki/Main_Page

But I want to break it into 3 pages:

  • Page w sidebar only
  • Favorites page w only green sections (recognized article / you know)
  • The "News" page is only the "blue" sections (in the news / on this day).

What is the best way to do this with tritium?

I assume that the abstract function I want is to create multiple pages from one page. This can be useful for organizing mobile pages at a finer level of detail. Another use case would be to create a jqtouch application.

+4
source share
1 answer

In Tritium, this is usually difficult because we try to act as close to the desktop as possible.

However, one way to do this would be to use query parameters. For example, if you want to have 3 pages like this, you can answer ?pageType="featured" or ?pageType="news" .

Then in your mapping you can do something like this:

 match($path) { with(/Main/) { match($path) { with(/\?.*featured/) { @import "pages/home/featured.ts" } with(/\?.*news/) { @import "pages/home/news.ts" } else() { @import "pages/home/home.ts" } } } } 
+3
source

Source: https://habr.com/ru/post/1479445/


All Articles