4

I have a single page, lets say:

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

But I want to fragment it into 3 pages:

  • A page w just the sidebar
  • A 'Featured' page w just the 'green' sections (featured article / did you know)
  • A 'News' page w just the 'blue' sections ( in the news / on this day)

Whats the best way to do this w tritium?

I guess the abstract feature I want is to be able to create several pages from a single page. This could be useful for organizing the mobile pages at a finer level of detail. Another use case would be constructing a jqtouch app.

Sean Jezewski
  • 145
  • 1
  • 7

1 Answers1

3

This is generally difficult in Tritium because we try to follow desktop functionality as closely as possible.

However, one way this would be doable would be through using query parameters. For instance, if you wanted to have 3 pages like this, you could respond to ?pageType="featured" or ?pageType="news".

Then with in your mapping you could 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"
      }
    }
  }
}