-
☆ A M B ☆
- 1,780 Posts
I have refrained from asking this question for a very long time. I figured, at some point I'd find out why it takes multiple clicks to clear the cache and it'd be a whopper of an obvious explanation. I've searched, read, and looked for solutions for over a year now but I'm still baffled.
While developing, I have been using an includeFile snippet. As such, I'm not saving the resource in the manager directly, which would clear the cache automatically. Thus, to see any changes that aren't in css files I have to clear the cache manually. It feels like a lot of extra clicks over and over again It's more cumbersome with a touchpad than a mouse of course but at this point... I'm annoyed enough to just turn caching off while developing and simplify my life.
So I have to ask... Why the heck isn't there a button that clears the cache without having to navigate through the menu? Exactly how difficult would this be to implement? And/or why can't it be done? Assuming of course there's a very good reason it can't (or shouldn't).
-
☆ A M B ☆
- 1,780 Posts
Revolution. I've never installed Evolution, so I can't compare to it. Is there a clear cache button in Evo?
Media Sources also functions similarly to an includeFile snippet. Cache has to be cleared before html changes show up.
[ed. note: frogabog last edited this post 14 years, 8 months ago.]
If you go to System -> Actions, you can either move the Clear Cache menu item to the Top Menu or you can create a new Top Menu item that duplicates that option (the second is safer).
Go to System -> Actions
(all the following are done in the right-hand panel)
Expand the "Site" menu
Right-click on "Clear Cache" and select "update menu"
Make a note of all the field settings, but don't change any
Click Cancel
Right-Click on the "Top Menu" folder
Select "Create Menu"
Enter the fields you noted earlier
Click on Save
Drag the new menu item to where you want it (you may have to refresh things first)
You may have to clear the cache and/or Flush All Sessions before it shows up -- I can't remember.
Using similar techniques, you can create a whole new menu structure with your choice of submenu items.
Be careful, though, because the original menu is not backed up anywhere and there's no easy way I know of to get back to it. If you delete a menu item, you'd have to recreate it from scratch. You can hide menu items by giving them a custom permission, but there's no way to get them back without giving yourself that custom permisson.
[ed. note: BobRay last edited this post 14 years, 8 months ago.]
-
☆ A M B ☆
- 1,780 Posts
I could kiss you Bob! Thank you so very much.
Now, if I could create some child resources I could work on the menu and give that baby some cache clearing action :~}
Glad it worked. I'm afraid I don't know what you mean about "child resources."
BTW, I should have mentioned that if you call the include snippet uncached during development, I think you won't need to clear the cache.
Did I mention that Bob's Guides accepts donations (not that a kiss wouldn't be nice)?
-
☆ A M B ☆
- 1,780 Posts
I am referring to the document/resource tree. When I first found MODX I paid attention to the fact that Revo called documents "resources" (as opposed to Evo), and ever since I think "resource" when I'm working with documents.
Basically I'm working on a top level menu, with child documents so the site I'm converting can lose it's gawd-awful two button too wide single level menu and I won't have to re-code every ugly page by hand with a new dropdown menu. I've been waiting for an official release of 2.2 to get into it, I really wanted to take advantage of media sources.
Considering that the "client" prefers to fail to understand that trading 10 minutes of chiropractic care does not equal 2 day's work on my end... I'm hoping I can impress him enough to actually get paid for the work I do. Course the chances of this are slim indeed. I've got two whole days into it already re-coding all the html with a new grid, and now I'm stuck unable to save child/sub documents/resources!
He'll never appreciate MODX. The amount of tech cluelessness within the doctor is a very deep vault. But it WILL make my life easier once it's done.
And, for whatever it's worth... If he ever pays me, the first thing I'm going to do is to buy your book. Something to flip through and reference that's not a tab in a browser sure would be nice.
So, for the time being you'll have to make do with imaginary kisses :~}
p.s. - Media Sources is working beautifully, I haven't even bothered with includeFile. I just edit the files in notepad++ and refresh the page. I really, really like that.
[ed. note: frogabog last edited this post 14 years, 8 months ago.]
Is in the front end? Are you using Wayfinder for the menu?
-
☆ A M B ☆
- 1,780 Posts
Bob,
Yes, I am using Wayfinder with some success. Upon upgrading to 2.2.0-pl2 (from 2.2.0-pl -- no idea why I had that release instead, but I'd downloaded it from the modxcms.com release page about an hour after the initial release notice) all the sub-pages (resources?) creation issues were solved.
So far so good with Wayfinder although I'm having a few problems getting it to display correctly. I'll create a new post for that, because I'm about done mucking through the docs trying to figure it out on my own.