Static pages - am I missing something
  • I've got a publication with a long list of issues and sections and content. I did all this before setting up any static content because I was moving existing stuff into Newscoop and new static content didn't exist yet. Now that I'm ready to setup a few static pages, it all seems very unclear. The method noted in the "Cookbook" - setting up an initial issue consisting of static pages as individual sections seems like a total hack, and that option has sailed anyway. My issue 1 is the first issue published. In making a new "article" or type "page" I am informed that choosing a publication, issue, and section are optional, but as soon as I try to "publish" it, I am seemingly forced to pick those things. Publication? sure, Issue? maybe, Section? no - I don't want another section ('static'?) showing up in a menu list even if I can filter the static articles out by 'type'

    I'm not really sure where to go from here. It seems like the next step would be to double down on hacks and setup individual tamplates for each static page and then stick the content directly into them. I don't really want to do that, but unless I'm missing something somewhere, static pages seem to have been kind of an abandoned afterthought for Newscoop.

    Please, tell me I'm wrong and I just haven't clicked the right button/link or whatever.
  • 6 Comments sorted by
  • Hi,

    in Newscoop, publication structure depends entirely on you. Also type of data (article types) you're submitting to that structure. So solution for static pages is custom too. What you can do, you can still use issue 1 for these purposes, just create section 200 or something (outside of content sections logic) and put static articles there. If you need help adjusting templates to serve that kind of solution, we can gladly help. 
    --
    Ljuba Rankovic
    Senior Front End Developer, Sourcefabric
    ljuba.rankovic@sourcefabric.org

    http://www.sourcefabric.org
    http://www.twitter.com/Sourcefabric
  • thanks for the reply?
    are you saying that the section numbering can ax out the built-in content logic? at section id 100 or something like that?
    or are you saying I need to alter it to max out?
  • If you have let's say monthly issues - usually, site navigation is built as list of sections of the last issue. If you create new section somewhere in the one of old issues (first one, for the simplicity) it won't appear in navigation. But even if you created new section in current issue, you can skip it from listing - in template, you can have something like

    {{ list_sections constraints="number smaller 100" }} 

    or 

    {{ list_sections constraints="number not 200 number not 210" }}
    --
    Ljuba Rankovic
    Senior Front End Developer, Sourcefabric
    ljuba.rankovic@sourcefabric.org

    http://www.sourcefabric.org
    http://www.twitter.com/Sourcefabric
  • I'm back at this. Thanks for your help. I've followed your pointers and now I'm just stuck on aesthetics.

    I managed to get it working as suggested, with "Static" as a section on my first issue and individual pages as articles (ie. About, Contact, RSS, etc.). The URL for those ends up being http://example.com/<language_code>/<issuei>/Static/<article_number>/<static_article_title&gt; and that's not so appealing when what I would really like is something along the lines of http://example.com/<language_code>/<static_page_title&gt; or http://example.com/<language_code>/Static/<static_page_title&gt;

    It seems like I can add the static pages as individual sections to an issue, and then make individual templates for each and assign the templates as default for the sections and I'll get a little of the way there by cutting out the section and article number from the url to result in http://example.com/<language_code>/<issue>/<static_page_section_name&gt;

    but if I create an issue (and assign it's URL "pages") just for static pages I can get it down to http://example.com/<language_code>/pages/<static_page_section_name&gt; (http://example.com/en/pages/contact) and that seems close enough to call a win. Unfortunately I can't create it as issue 1. I've been looking for a way to assign it an exceedingly high issue number (9999) and then ignore issues greater_equal 9999 in the same way I can with sections and articles so that it isn't the current issue for all of time. I can't seem to find the logic in any main template file though, so I'm lead to believe  it's hard coded into newscoop to always grab the highest number published issue as the current issue. 

    My hacky work-around for this might be wait until the next issue is being created and then to create this "static pages" issue right before that one so that it is never the current issue, but I'd rather avoid that if I can as it throws the numbering off.

    Any further suggestions would be greatly appreciated.

    Thanks again,  


  • I decided to create a section for static pages in the 1st issue and use constraints to control what gets listed where. I also want to clean up the URLs a bit, from example.com/<language_code>/<issue>/<section>/<article_number>/<article_name> to example.com/<article_name> using mod_rewrite rules. However, the rewrite rules are I setup are not being triggered, regardless of where I locate them (httpd.config context, .htaccess in doc root context, or the virtual host. Nothing seems to match with the rules. The only thing triggered are the newscoop-configured conditions/rules in .htaccess.

    Does anyone have any insight into this? Is it a known limitation of Newscoop's own rewriting configuration? or is it likely a configuration error on my part? I tried some troubleshooting with the #apache irc channel but clearly it didn't lead to a solution.

    thanks
    Post edited by captain stupy at 2014-02-20 09:00:49
  • an answer to my question about the rewrite rules was supplied in another thread I more recently posted... http://forum.sourcefabric.org/discussion/16444/newscoop-and-apache-mod_rewrite-directives