We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26435
    • 1,193 Posts
    I don’t know if this suits anyone elses style, but on my blog comments chunk, I have a TV that asks a user to login to post comments if they are not logged in, and says you are logged in as "User’s ID" if they are logged in. In the default install of NewsPublisher, the documents it creates are saved as cacheable, so once a user logs out, when they navigate back to the page it still says they are logged in, but gives no form for them to post comments because the are in fact NOT logged in. It is just because the page is loaded from cache. So, I added a line to to the NewsPublisher snippet around line 190 or so that adds the code:
    				'cacheable'	=> '0',
    
    

    to the $flds array.

    It works better for me than logging into the manager to change a documents ’cacheable’ status each time I add a news item. Perhaps you will find it useful as well

    regards

    -sD-
      Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
      All of the above... in no specific order.


      I send pointless little messages
    • Ahhh... good call Scotty... probably a parameter we should in fact add to the configuration parameters that can be passed in.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me