• Members 49 posts
    June 24, 2018, 12:43 p.m.

    Hi Rafalp,

    Instead of using Misago's index page i'm using my own. So far I've done that by adding my template to Misago base like this:

    <div id="misago-container">
      {% include "misago/jumbotron.html" %}
      {% include "misago/navbar.html" %}
    
     {% if "/" == request.path %}
    {% include "my index page.html" %}
    {% endif %}
    

    This has worked just fine up until this point, cause now I need to use context processors in the view, to make the index page dynamic. This works well on my other pages which are seperated from Misago, but as Misago "controls" the index page, i'm not really sure at which angle I should approach this.

    Should I work on seperating Misago from the index page, or add my context processors to Misago's view? In case of the last approach, is it possible to add custom views to Misago, without forking, and which views are the relevant one?

  • June 24, 2018, 1 p.m.

    There is few ways to go about this, and some don't require you to fork Misago.

    The cheapest one is to edit your urls.py to move misago.urls to subpath like /forums/, then use root path for your own Django app or some Django CMS to display other content. Next step would be to override the misago/jumbotron.html or misago/navbar.html template to include the link to your portal.

    On sidenote, I really want to add extension hooks for adding custom routes to Misago's frontend, but this would require new frontend to land before any planning for that would make any sense.

  • Members 49 posts
    June 24, 2018, 2:40 p.m.

    Allright, I'll go that route.

    You mention moving misago to a subpath. Any reason I can't just do this:

    urlpatterns = [
    url(r'^$', TemplateView.as_view(template_name="myindex/myindex.html")),
    url(r'', include('theme.urls.urls-custom', namespace='misago')),

    It seems to work just fine. Anything i'm not seeing?

  • June 24, 2018, 2:42 p.m.

    I' thinking that doing it that way may make Misago's / path unreachable.

  • Members 49 posts
    June 24, 2018, 2:49 p.m.

    You're right, but as i'm using my own index page Misago's / is not needed (I think).
    Works so far. I'll change it if problems arise.

    Thanks for the help. You can close this.
    I have another question, but will open another thread :-)

  • June 24, 2018, 2:51 p.m.

    You're right, but as i'm using my own index page Misago's / is not needed (I think).

    One problem that you may encounter is user going from thread's page to category, then up to threads list, and finally refreshing the page with F5, which will produce different result than what they were on before.

  • Members 49 posts
    June 24, 2018, 3:08 p.m.

    Yeah I see there's some problems with that. And if somebody goes from category to threadlist they are back to the threadlist presenting itself as index (though I'll just change index name in misago admin to something like latest post). Also if somebody press "Threads" in the breadcrumbs it goes to the custom index page.

    But then againg moving misago to subpath makes the navbar logo refer to misago index and not my own. And there might be others things we haven't thought about.

    Guess I'll go with not moving misago to subpath, and test it for some time.

  • June 24, 2018, 3:20 p.m.

    If you change default page in Misago to categories list, "Threads" link will still be present in menu, but it will lead to /threads/ and keep the page accessible for your users.

  • Members 49 posts
    June 24, 2018, 3:35 p.m.

    Cool, where do I change the default page in misago?

  • June 24, 2018, 3:38 p.m.

    In your settings.py. See the docs for details.