Jump to content

cb2004

Members
  • Posts

    542
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by cb2004

  1. ProDrafts should be coming soon which is a commercial module. But it looks awesome.
  2. Think I found the answer. The parent template can hold a name format for children, I just put in title as instructed and it begins as untitled. Man I do love ProcessWire.
  3. When adding a page you need to enter a title, the name is then auto-populated from this. I am building a system where quotes are created, I would then create an invoice. The quote would contain a project name, the invoice title would need to be the same as the project name in the quote. Is this linking possible at this step, or am I going to have to hook into it after save?
  4. Need to dive into this soon. But I will need to bring over featured images and anything from Yoast, so I will report my findings once looking at the structure.
  5. Should anybody need this: $pages->addHookAfter("ProcessPageEdit::buildForm", function(HookEvent $event) { $page = $event->object->getPage(); $form = $event->return; if ($page->template->id == 44 && $page->parent->id != 1020) { $fieldset = $form->find("id=Inputfield_fieldset_tab_2")->first(); $form->remove($fieldset); $event->object->removeTab("Inputfield_fieldset_tab_2"); } }); Just replace the $page->template->id with the id of your template, and the $page->parent->id to what you want (or something similar). Finally replace fieldset_tab_2 with the name of your field.
  6. I have a repeater, which with the use of a hook I can stop that from displaying from certain pages: <?php $wire->addHookAfter("ProcessPageEdit::buildForm", function(HookEvent $event) { $process = $event->object; $form = $event->return; $page = $process->getPage(); if ($page->template->id == 44 && $page->parent->id != 1020 && $page->parent->id != 1021) { $form->remove($form->getChildByName("repeater_partners")); } }); My repeater is in a fieldset tab, so on any pages where the repeater should not be displayed, the fieldset tab is (the repeater is not). Any way to remove this within the above? Cheers.
  7. For me this is great news. All my sites going forward will only be tested in IE11. If there is a problem with anything below that, the end of life can be highlighted to the client, and a fix will cost extra (unless it is simple of course). Gone are the days I have to spend time and implement fixes for crap browsers for no extra money.
  8. Do you have any cache settings on the template?
  9. Yeah I jumped into the blog post shortly after and came up with the following: <?php $pages->addHookAfter("ProcessPageEdit::buildForm", function($event) { $form = $event->return; $page = $event->object; if ($page->template->id == 47 && $page->numChildren == 0) { $form->remove($form->getChildByName("rte_basic_2")); } });
  10. It works fine, cheers (edited my above post). Where can I read up more about hooks?
  11. Cheers BernhardB, no joy I am afraid though. Edit: scrap that, I enabled debug mode and then all was fine. Thanks.
  12. So if I am editing a page and it has children, can I display a text box? Cheers.
  13. Yes, without the leading slash.
  14. I am trying to implement Jumplinks on a new site but not sure what is happening, the 404 template is not even being fired. I dont think this is a bug with Jumplinks or ProcessWire to be honest, but wondering if any light could be shed on this. If I go to /example.php, I get a page which just says 'File not found.' and nothing else. If I go to /example then the 404 template is fired. I have setup Jumplinks to try and change /example.php to go to /new-example but it is not kicking in. Server configuration do you think?
  15. Thank you for your time on this. Just thought I would post it as I couldn't find anything similar on the forum so it may help future users.
  16. I am displaying calendar entries by using a datetime field for the start date and I will later be extending it by also displaying an end date. What I wanted to do was have the year as a heading and then all results for that year will be displayed. What I have below is actually working great, I was just wondering if it was a good technique? $results = $page->children; if (count($results)) { $years = array(); foreach ($results as $result) { $years[] = strftime("%Y", $result->date_1); } $years_unique = array_unique($years); foreach ($years_unique as $year) { echo "<h3>{$year}</h3>"; $start = strtotime(date("$year-01-01") . " 00:00:00"); $end = strtotime(date("$year-12-31") . " 23:59:59"); foreach ($page->children("date_1>$start, date_1<$end") as $child) { echo "<p>{$child->title}</p>"; } } } Cheers all.
  17. There is a new development release of Processwire every week that you can download. The upcoming version 3 (currently in alpha) will allow for composer support and lots of other things. Its a good time to get involved. I made the switch about 6 months ago and I haven't looked back. I feel I have only just scratched the surface with what this system could potentially do.
  18. Bit confused why this would be removed, considering you now have to go into the page, go to the delete tab and all this does is send it to the trash anyway.
  19. Interesting issue here. I have the setup: Articles page which is hidden. This has the template 'articles' which does not have a file. The children of the Articles have the template 'article' which does have a file. When I change $children = $page->children; to $children = $page->children("template=article, include=all"); these are not displayed. I am using 2.6.19.
  20. This thread is jumping all over the place now. The link you posted about Drupal scalability is describing the job of a good server. The notable users Wordpress link pretty much mentions blogs. I have only used PW for 6 months and I have used it on government websites because I have confidence in it. A brand/household name does not equal a good implementation of a piece of software or hassle free running of that site. That is complete miss-selling.
  21. Wordpress already caters to those people, why try and compete? Most of the modules it has look like they are built by non-developers as well, there is no quality control. It is a non-developers world all round I don't want to turn this thread into a Wordpress bashing. As Martin pointed out you can Google developers views on it without even comparing it to another CMS/CMF.
  22. But that is the market that Wordpress caters for, I disagree strongly that every CMS should be geared towards the non-developer. Is Processwire easy to use for a non-developer once it is setup, oh yes, easiest thing ever. Question; what does a non-developer do when they cannot progress their Wordpress site any further? They have installed so many plugins trying to do what they wanted to do, its crawled to a halt and made it vulnerable turning the agency they hand it over to into a Wordpress maintainer. What does somebody who is using Shopify do when they grow too big for it? Point being there are tools which are great for starting something, and there are tools that are great for starting something and finishing the job properly. I like where I am going with tools. Wordpress is a screwdriver, Processwire is a power drill . Processwire will go wherever your imagination takes you, quicker and easier, right here, right now [citation needed]. What the future holds nobody really knows. What if some great developers left Wordpress and screwed it up, that could happen, there is no crystal ball. Lets not forget that Wordpress is a blog, and will always be developed as a blog. Even in the activity link you posted, they comment heavily on blogging. I would love to see how many Wordpress installs are actually active and not just sitting on a server getting auto updated. Wordpress with the ACF plugin kind of turns it into a CMS, but ACF is a hog. I go back to my previous post and extend it. Long-term, my personal choice right now is to use Processwire, it seems perfect for my business model. Once setup I can let most of my clients run away with it with no manual, telephone calls or handover meetings. Not really sure on the Windows, Unix, iOS comparison, or how iOS took over?
  23. Wordpress is number 1 because so many people install it, add a theme/plugins and call themselves a web developer. Remember that is number 1 for the amount of websites it is running, not number 1 voted for by every developer in the world, it would no doubt be a different story then. Does Wordpress have a place running websites, sure, but I like to think of myself as a web developer, not a Wordpress maintainer, which is what so many people become when they take on Wordpress sites, and why I steer clear of it (if I can). This conversation comes up a lot, but stick to what works best for you for a project at the end of the day. I know what my projects will run off for the foreseeable future.
  24. Those numbers to me prove 1 thing, less is more. I have tried and tested many CMS platforms. I was guided in the direction of PW and started using it about 6 months ago. My search for an extremely feature rich, easy to use CMS seems complete. It only took 16 years.
  25. A lot of my clients know what they are doing and they know that a 404 page can be important to direct people to other pages of their website within the content. I think there should be a setting to enable the 404 page to be visible in the page tree for roles other than the superuser. Using the permissions scheme and allowing editing for say the template related to a 404 page has no effect.
×
×
  • Create New...