locked
How to create custom item pages in the hub template?

    Question

  • I'm creating a windows store app which has 5 sections, using the hub template. 3 out of the 5 sections have a listview with 2-6 items each. As you all know, the hub as well as the grid template has an item folder with an html, css and js file in it. When you click on any item in the listview, it will navigate to this html page. So, if you are building an app like the Contoso Cookbook it will be just fine, because the pages for each item have basically the same structure, only the images and text contents are changing.

    But, what if I want a different look for each item page. Then, the html structure of each item page cannot be the same i guess.

    My solution is that I think I should create a specific folder for each item with its own html, css and js files in it. Like: item1 folder > item1.html, item1.css and item1.js. In my app, I have like 12 items which means there would be 12 folders like this. Also, I need to modify the codes in the js file in order to navigate to the specific page.

    What I want to know is that is this the correct way of doing it or is there a better way? 

    Monday, October 20, 2014 5:23 PM

Answers

  • Hi bliks07,

    But, what if I want a different look for each item page. Then, the html structure of each item page cannot be the same i guess.

    -> I'm thinking if we could binding CSS to the hub section but I could not find documentation.

    Anyway, when we use the template, it means all the hub section use the same style and same layout, if you want to customize them, please try to add them one by one from backend instead of use binding.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, October 21, 2014 8:30 AM
    Moderator