× Warning! This forum is in archival status. New contributions may not work.
How to create section and front page modular templates
  • Hi,

    Sorry for the newby question here, but I'm starting to develop a theme for a client using Newscoop and I'm facing a few challenges, and I'm hoping the community can set me off on the right direction.

    These are the requirements:

    --> For each issue, they need different layouts for their front page and sections page. CSS are shared but they need to set the articles diferently on the grid. For instance, for one issue they would like the front page to have:
           -- Section name
                -- row #1 -> big article
                -- row #2 --> grid with 4 articles
           -- Section name
                -- row #1 --> grid with 2 articles
                -- row #2 --> grid with 4 photos
    On the next issue, maybe the first section would need to have three rows: the first one would be a big article, then a grid of four articles and then a grid with 4 photos. Meaning: They want to have a set number of configurations that they can place in different locations and fill in with diferent types of contents as needed.

    I've checked the cookbook but haven't seen any option as to set a different style for a list of articles or how to do this custom grid. Maybe there's something I've missed?

    --> Say they have an interview taped on video, and they want to show it on the front-page instead of a image. Given that the video is hosted on Vimeo, how can they do that? Is there a way to create custom fields for a article that I can then invoke on the template?

    Thanks a lot in advance!
    Post edited by Alicia Urrea at 2015-02-12 08:00:50
  • 3 Comments sorted by
  • It's possible to use different templates in each issue, simply change the default front page template or section template in the settings for that issue.

    You can also create custom fields in Newscoop. Click on 'Article Types' in the Configure menu and click on 'Fields' to edit the fields for that article type. This can be used for videos, and you could also make a field to allow the article editor to select which row this article should be in.

    A third way to accomplish this is to use the Featured Article lists and make a list for each row. This would however not be limited to articles from only one issue.
  • Hi,

    as Sebastian said, you can prepare different layouts for sections, then assign appropriate one for every single section (that's in section settings). If you don't set it, then it will simply use default one assigned on issue level for all sections, or even from theme settings, where default front, section and article template are specified.

    For vimeo videos, you can create simple text field where url of vimeo video can be pasted, then in template have something like this:

        {{ if !($gimme->article->vimeo_url == "") }}
          {{ assign var="vimeocode" value=$gimme->article->vimeo_url|replace:"http://vimeo.com/":"" }}
          <iframe src="http://player.vimeo.com/video/{{ $vimeocode }}?title=0&amp;byline=0&amp;portrait=0&amp;color=e20020" width="555" height="370" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>
        {{ /if }}
    --
    Ljuba Rankovic
    Senior Front End Developer, Sourcefabric
    ljuba.rankovic@sourcefabric.org

    http://www.sourcefabric.org
    http://www.twitter.com/Sourcefabric
  • Thanks for the fast and detailed answers. The video part is clear, thanks a lot.

    The other part, with the lists and the templates per number, that's what my client has on right now and it's not working. They want to be able to change so much of the layout in each issue that he's got a set of 5 new  templates each week (it's a weekly magazine), with 5 article lists per issue that only work properly with the templates created specifically for the isse.

    We need something more modular. I'm thinking aloud here, but it would be something like creating a hierarchy within the lists so that we can figure where each block of content starts and ends, and then asign a layout per block.

    I think the optimal solution at least for us, would be to create a diferent object type (such as article, issue, etc.) called front-page where you could add blocks, and for each block choose the type of block (template that would apply to it), and choose the articles that should be listed under it.

    Any thoughts would be greatly appreciated!


    Post edited by Alicia Urrea at 2015-02-13 04:37:58