Jump to content

gmclelland

Members
  • Posts

    566
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by gmclelland

  1. Here's where it talks about the site/ready.php file https://processwire.com/blog/posts/processwire-2.6.7-core-updates-and-more/ I think I remember why I chose not to use id based urls. I was worried it might be hard to import/export pages because the ids on the other site/system you are migrating to might be different. I think that's why I chose to use the built in behavior of Processwire. In my case duplicate page names don't happen very often. I would like to hear other people's opinion on urls that contain a page id.
  2. ...updated the blog_post template prepending _ready.php .... You shouldn't need to prepend the file. I believe site/ready.php gets picked up automatically. To fix your other blog posts, just re-save them and the hook should execute and correct the page name with the correct format. If there's a bunch of posts to go through, you could use Adrian's admin actions module http://modules.processwire.com/modules/process-admin-actions/ or the process wire API to loop through and re-save the pages.
  3. That's why I created a posted_on datetime field. I manually entered the date and time into that field since it may be different than time the post was published in Processwire.
  4. On my "news" template I have a datetime field for "published_on" that I use in the parent's template(news-index) "Sort settings for children" (reversed sort is checked). I'm pretty sure the sorting works for news items posted on the same day.
  5. Your welcome. I'm still learning too! Looks like it generates and assigns a random id here https://github.com/processwire/processwire/blob/6241fd67300c456c225cb336a3de27acab167b2d/wire/core/PagesEditor.php#L343 until the page is saved. Probably to make sure the page name is unique? Pages are stored in the "pages" table. The field data is stored in each field_fieldname table. Each field gets it's own database table.
  6. Hrmm... I tried it on a site and couldn't get it to work. You might need to go the module or hook in your ready.php route. I also don't think you are seeing the correct id of the new page. We are probably seeing a temp page id, since the page hasn't been created yet. On a past site, I choose to simply not worry about the page name. When a new page is created and the name is not unique, an incrementing number will be appended to the end of it until it is unique. To make it easier to view the news postings in the page tree, I edited the template's under the "Advanced" tab > "List of fields to display in the admin Page List" setting to include the date. Someone else may chime with some other better ideas.
  7. Try it like this "$id $title" without quotes. A dash will probably automatically replace the space character.
  8. It's in the second screenshot with the Blog template. It's collapsed.
  9. If that doesn't work you may need the module from here. There's also a list of forum discussion that mention how to do it with a hook.
  10. Edit the Parent template and look under the "Family" tab and you'll see the "Name format for children" Try entering "id-title" without quotes in that field and see if it works. As described on http://processwire.com/api/modules/process-template/ You might also need http://modules.processwire.com/modules/page-rename-options/ Hope that helps
  11. You could use Cloudflare.com's DNS and set a Page Rule to set the security level to "High" for your admin url. I've never had much luck blocking IP addresses.
  12. @nabo For multilingual url fields maybe you could try this module with https://github.com/ryancramerdesign/FieldtypeURLLanguage? Sorry @anyway, I'm not sure. Maybe you can list the permission of the user's roles? Does the user's role have the page-edit permission? Did you enable access control for the field? Edit the field and click on the "Access" tab to check.
  13. Thinking about it some more... As an alternative to "Single Child", you could also use "One per parent"
  14. Seems like a good enhancement. The examples you provided were well thought out.
  15. Thanks for providing the site profile! Just wanted to let others know I had to do the following to login. Add this to the startpage.php in the site/templates/ directory $admin = $users->get('admin'); $admin->setOutputFormatting(false); $admin->pass = 'herewegocheckitout22'; // put in your new password $admin->save(); Then visit the homepage to execute the code. Then remove the same code from the template. Then login to yoursite.com/processwire/ not yoursite.com/wire/ Hope that helps others
  16. FYI... There is also a discussion around focal point image cropping https://github.com/processwire/processwire-requests/issues/150 if anyone is interested.
  17. I know this old, but the answer to this question is to add: $accept->attr('data-href', wire('config')->urls->admin . 'page/edit/?id=1479'); Remove this line: $accept->attr('href', 'http://localhost/winkelmann/www/bewerbertool-talents/admin/page/edit/?id=1479'); Hope that helps the next person.
  18. @flydev - I have ran into the same issues with my sites that use TemplateEngineFactory with TWIG. I had to do the following: $session->redirect($pages->get($config->http404PageID)->httpurl()); throw new Wire404Exception(); Maybe you could post something in the TemplateEngineFactory topic? Maybe @Wanze would know of a fix?
  19. @louisstephens Those content sections are just rendered with a foreach loop like: foreach($page->test_matrix as $item) { if($item->type == 'blockquote') { echo " <blockquote> <p>$item->quote</p> <cite>$item->quote_cite</cite> </blockquote> "; } else if($item->type == 'bodycopy') { echo " <h2>$item->title</h2> $item->body "; } else if($item->type == 'gallery') { // and so on... } } That code was taken from http://processwire.com/api/modules/profields/repeater-matrix/ So when a user changes the order, it will automatically be displayed in that order on the frontend.
  20. Well it definitely can be done. See https://processwire.com/blog/posts/amazon-aws-now-powering-processwire.com-sites/ I've had good success with running sites on a $10/month 2GB Linode VPS and https://serverpilot.io/ $10/month per server.
  21. @patman I too, would like to be able to use the address data with JSON-ld. In case you haven't already tried it, you might want to give https://github.com/clipmagic/MarkupJsonLDSchema a shot for the JSON-ld.
  22. @Juergen, I believe that is fixed in this commit https://github.com/processwire/processwire/commit/f3749d241a5f4da4d9df3731d1b99d001eaf0f50
  23. Yes, I can confirm PNG and GIFs are working now with 3.0.88
  24. Just thought I would share this cool new chrome/firefox addon for https://insight.io that I discovered. It allows you to quickly search or view the folder/file hierarchy of a repository inside of github. It also allows you to list the methods of a class It's very similar to https://chrome.google.com/webstore/detail/octotree/bkhaagjahfmjljalopjnoealnfndnagc, but provides more features. On the github repo page it shows a insight.io button where you can view the current file on github that you are looking at on insight.io for more features like where specific functions are referenced. Note: I'm not affiliated with that company. I just thought it was helpful.
×
×
  • Create New...