Jump to content

AndZyk

Members
  • Posts

    686
  • Joined

  • Days Won

    10

AndZyk last won the day on December 18 2024

AndZyk had the most liked content!

Recent Profile Visitors

8,469 profile views

AndZyk's Achievements

Hero Member

Hero Member (6/6)

945

Reputation

3

Community Answers

  1. Hello @nclm, if your services page has no template file, you could put this in your _init.php: if ($_SERVER['REQUEST_URI'] == '/services/') { session()->redirect('/', 301); } Source: https://processwire.com/api/ref/session/redirect/ If your services page has a template file, you could put this in the template file: session()->redirect('/', 301); But it would only work with a hidden page. Regards, Andreas
  2. Thank you for your explanation @virtualgadjo. πŸ˜€ My preferred structure looks like this: Blog (template blog) Post 1 (template post) Post 2 ... Categories (template categories) Category 1 (template category) Category 2 ... Tags (template tags) Tag 1 (template tag) Tag 2 ... The templates categories and tags have no template file, but category and tag have one. The templates blog, category and tag have pagination enabled. The post template hast two page reference fields: Category (single selection) and tags (multi selection). This way there would be urls like: blog/post1 blog/categories/category1 blog/tags/tag1 My structure would not allow for a post to have multiple categories and disconnects tags from categories. Also I try not to use URL segments. That would be the main difference between your and mine structure. But of course there is no wrong or right structure. So everything is possible. πŸ™‚ Have a nice day.
  3. @virtualgadjo Maybe I am missing something, but your structure and the first structure achieve exactly the same result. The only difference is your structure uses one template (blog-index) with URL segments and the other one would use three templates (blog-index, blog-cat-index and blog-tag-index) and no URL segments. I used the first structure (all inside blog with two page reference fields) many times with no downsides. So what I want to say: It is just a matter of preference. ✌️
  4. Hello @Alpina, if your template blog-post has a date field and the other templates (blog-cat-index and blog-tag-index) not, you could sort the children of your template-blog-index by that date field. Then the blog posts should be always before the categories and tags. You can sort them in the template settings of your blog-index template under the family tab. That is how I like to do it. You could also use a system date fields like created or modified, but then the categories and tags could get mixed in the sort order. Regards, Andreas
  5. You have to look in the ProcessLogin module settings. You can find it in the core modules or with the search function. πŸ˜‰
  6. Hello @DrQuincy, have you tried this: Source: https://processwire.com/blog/posts/pw-3.0.159/ Regards, Andreas
  7. Thank you for the update. ❀️
  8. Hello @adrian, today I setup a fresh PW install with ProcessWire 3.0.245 and of course Tracy Debugger 4.26.60. Now I don't like to have always the full Tracy bar expanded when I do simple stuff, so I hide the Tracy bar with the "Hide Tracy" button in the right corner. Today when I use the "Hide Tracy" button the Tracy bar gets collapsed as expected, but when I reload the page it is completely hidden. It seems that the #tracy-show-button has "display: none" as styling. It seems to be a console error in this line: document.getElementById("tracy-show-button").style.display = "block"; Uncaught TypeError: Cannot read properties of null (reading 'style') at hideDebugBar ((Index):204:240) Can somebody reproduce this? Regards, Andreas
  9. I am on a Mac and make a daily TimeMachine backup. For my local server I use MAMP PRO and make snapshots that I upload to the cloud every few months. I export the newest database backups with TracyDebugger Adminer when I have to update a website. In the past I used the Database backups module but now I prefer Adminer.
  10. Happy to hear you found the issue. πŸ˜€ You could consider indexing the pages with a Lazy Cron or a cronjob.
  11. Hello @tires, have you tried looking in TracyDebugger if there is an error? Do you use hooks or special modules? The amount of subpages should not be an issue in my experience. Maybe there is something else going on. Regards, Andreas
  12. Hi @olivetree, my preferred structure is one template blog or news which contains children with the template post. Inside this tree I have two trees for categories and tags. Every post has two page references fields to reference one or multiple categories and tags. So it would look like this: Blog Post 1 Post 2 Post 3 ... Categories Category 1 Category 2 Category 3 ... Tags Tag 1 Tag 2 Tag 3 ... You could also use URL segments for shorter urls, f.e.: blog/categories/category1/ => blog/category1/ You can also enable a pagination or comments. Of course you can choose a different structure if you want to. πŸ˜€ Regards, Andreas
  13. If there is a new ProcessWire module in the wild @teppo will find it. Thank you for your module. πŸ‘
  14. Hello @benbyf, yes I include the wire folder in my repo. I am no Git expert but looked how .gitignore files for other CMS are recommended here in this popular collection on GitHub: https://github.com/github/gitignore Most other CMS like WordPress, TYPO3, Joomla!, Kirby etc. recommend to add Git in the root folder and track the core folders. For WordPress now it is recommended to optionally ignore the core folders, but at the time I was looking that wasn't the case. Here are my pros and cons for adding Git in the root folder: Pros One repo for the complete website You can clone the complete website with one command Sometimes there are important files in the root, like f.e. Service Workers or Composer packages You know which version of the CMS is used You can use new functions of the CMS without keeping track of the CMS version somewhere else If someone modifies or hacks your wire folder, you could see the differences Cons More commits Larger repo But ProcessWire gets a master version only once or twice a year, so the cons are for me not noticeable. Of course as I said I am no Git expert and everybody is free to use Git how they want. πŸ˜€ Regards, Andreas
  15. I add Git in the root folder and can recommend GitKraken as app. πŸ˜€ I have a develop and a master branch and an origin remote. Our remote repositories are hosted on Bitbucket. This is my current .gitignore file: Regards, Andreas
Γ—
Γ—
  • Create New...