Jump to content

nickngqs

Members
  • Posts

    19
  • Joined

  • Last visited

nickngqs's Achievements

Jr. Member

Jr. Member (3/6)

4

Reputation

  1. I just found out the issue filemtime doesn't resolve the path of $config->paths->assets . 'js/script.js' You will need to use $_SERVER["DOCUMENT_ROOT"] to get the root of your server. So the line should be something like this filemtime($_SERVER["DOCUMENT_ROOT"] . $config->paths->assets . 'js/script.js'); Hope this helps anyone
  2. How do you wipe the cache or something. When i do the filemtime, it doesn't detect the new modified time, it always produce the same $js_version string. I've tried clearstatecache() but to no avail, it's always producing the same $js_version string.
  3. How do you guys sort according to the order of page listing? My template is sort order none, so I assume it would return according to order of page listing.
  4. @kongondo Ahh, I see! Alright, I guess I'll just created that page. My workaround was to create that page with the template as I've written on top.
  5. Yes, I'm awared of that. In normal setup, in a non Processwire website. I'll just put a add_client.php in a folder, and form post to that add_client.php which will provide that server-side handling for that request. But the issue I'm getting is that since Processwire routes everything according to the pages you've created. How can I route that url to add_client.php file without creating a page. Currently, my work around is creating a page called add_client.php I'm just curious if there's a better way to do this.
  6. Hi, thanks for the insight. But not, what I'm looking for. (But it does help with my later part of the stage) But for now, currently, when doing a <form action='add_client.php> </form>. Processwire search for pages instead. So I'll need to create a page named add_client with a add_client template to make it work. How to I ask the form to post straight to add_client.php without adding a page. Thanks, I'll looking into this.
  7. I'm trying to create a form that does a post to a php file, getting the values before posting to a database. For example a form with an action /controller/add_client.php. My current workaround is create a page with the add_client template. But is it possible to do that without creating a page? I.E i do not want it to show on the CMS side.
  8. Does anyone know how to do an export of a page entries to CSV using the Processwire way? I'm trying to setup a list where the client can see a list of user's form values. Example -> A front end form -> Upon submit -> Adds to database -> Shows on the admin of Processwire. From there, I can see the entries and sort stuff. And lastly I can export them in CSV. I'm looking at the Processwire cheatsheet and see the $files, is this the one I should be looking at?
  9. So how do you guys execute this? Which folder do I put and so on. I'm coming from javascript world. For example, I will do node script.js. But how do I do this in php?
  10. Ahh! Thanks! Managed to get this working guys! You'll need to login and log out again
  11. Hi thanks! Managed to follow your tips. However, I still unable to see the tab on the masthead. I did managed to add the permissions and add them to my Role 'Client'. So previously, I can't access url/admin/settings. But right now I can access url/admin/settings using the permission. But still unable to figure out how to see the Settings tab. This is the superuser view While the client view is
  12. How do I change the permissions for Who can access this page for a single page. This page inherits the admin template. I'm currently creating a new page called Settings using admin template and assigning it to a process of a module. I can see the Settings tab in superuser, but I can't see them in a role I defined called 'client'. So, how can i control what the client sees for admin template? Is there a page specific overwrites for permissions. I've tried allowing access in admin template view, edit. But still doesn't work
  13. Hi guys, I'm trying to wrap my head around creating dynamic blocks where the end-user can add blocks on the fly on individual pages without specifying it in the templates. What approach do you guys usually do? I've tried scouring the forum for solutions but seems to get abit confusing. I've read Hanna Code, Repeater Matrix, PagesTables and seen the youtube tutorials. Not sure, where to start from. I only got very minimal knowledge of php as I came from a front-end background (html, css, js) I'm looking to define my blocks somewhere where the end-user will not be able to see. For example, a simple block container <div class='container'> <div class='container__title'> {{ $title-field }} </div> <div class='container__image'> {{ $image-field }} </div> </div> Then maybe we got a second block container <div class='container-2'> <div class='container-2__title'> {{ $title-field }} </div> <div class='container-2__image'> {{ $image-field }} </div> </div> Then the end-user can just to add these blocks into any pages on the fly and re order them according to their needs. My processwire is v3 using the UIKit3 Admin if that makes any difference Sorry if I sounded too noob.
  14. Thanks everyone for your advice, it's extremely helpful. Will update if I managed to convince my next client for the switch
×
×
  • Create New...