• GitHub
  • Documentation
  • Discord
  • Tip
search
  • chevron_right Threads
  • label Dev Development

How to change the thread template?

nostub
July 3, 2017
chat_bubble_outline 5
  • link
    nostub
    Members 9 posts
    July 3, 2017, 8:25 p.m. July 3, 2017, 8:25 p.m.
    link

    Hello,
    When I change the template for the thread (templates/misago/threadslist/thread.hml), directly in the lib folder, or in my template folder (theme/templates/misago/threadlist/thread.html), the change appear for a very short instant and then disappear, as if javascript or something else overrides my changes (but I do see that my changes are taken into account in the debug interface, in "Templates" part), what do I have to do to make a persistent change?
    Maybe this has to do with data caching?
    Thanks in advance

  • link
    rafalp
    Project Lead 2027 posts
    July 3, 2017, 8:58 p.m. July 3, 2017, 8:58 p.m.
    link

    Hey, have you seen this discussion?

    You may find it informative if you are looking to modify templates.

  • link
    nostub
    Members 9 posts
    July 3, 2017, 11:46 p.m. July 3, 2017, 11:46 p.m.
    link

    Yes, thank you Rafap it was informative.
    Indeed with Javascript disabled, I was able to see the changes.
    I understand that I have to modify the Javascript to make my changes.
    Is it misago/static/misago/js/misago.js file that I have to modify?
    It seems to have been uglified but there is an misago.js.map also.
    How can I work these two files to modify the template dynamically?
    Thank you very much

  • link
    rafalp
    Project Lead 2027 posts
    July 3, 2017, 11:48 p.m. July 3, 2017, 11:48 p.m.
    link

    Hey,

    Actually you should git clone the master or 0.8 release from project's github. Within you'll find the frontend directory with Misago's frontend application and gulpfile that contains scripts for running dev and production builds. You may also edit it's output path so it points to your theme/static/misago directory.

    yangygao likes this.

    favorite 1

  • link
    nostub
    Members 9 posts
    July 4, 2017, 1:33 p.m. July 4, 2017, 1:33 p.m.
    link

    Thank you very much, that answers my question

  • arrow_forward

    Thread has been moved from Resolved Reports.

    • By rafalp on July 7, 2017, 9:47 a.m..
  • link
    thanTalos
    Members 3 posts
    July 7, 2017, 9:37 p.m. July 7, 2017, 9:37 p.m.
    link
    @nostub

    Thank you very much, that answers my question

    Hi, is it possible you can post your modified code? I'm trying to customize the posts, but I'm having a hard time following along. I can get non-js changed to appear with js disabled when I use a pip installed misago, but not when I clone it directly.

arrow_upward Go to top
  • This site uses cookies to gather statistical data for use in traffic analysis.
  • GitHub
  • Documentation
  • Discord
  • Tip
  • Terms of service
  • Privacy policy
powered by misago