Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. <?php $site = $pages->get(SOMETHING); $image = $site->images->get("name=logo.jpg"); $image = $image->width(200); echo "<img src='$image->url'/>"; ?> But there's still no check whether the page or the image is acctually there.
  2. Really nice design. I like the graphics a lot. A small thing I noticed. On the Team site, there are categories with no members assigned (Ensamble 2013/2014). Maybe filter the selectable categories while page render, or at least show a message to inform people, that actually there aren't people in that part of the team, yet.
  3. I don't It prevents proper propagation of font size changes and therefore isn't perfect if you want to maintain a flexible css base. Edit: If someone wants to use the php way, but still maintain the pretty print. One could also mask the whitespaces in html comment tags via a preg_replace.
  4. There is a way around this. Either remove all whitespace characters from the pagination string you get. $out = $list->renderPager($options); $out = str_replace(array("\n", "\t", "\r"), "", $out); This should work as long as there aren't real spaces between the tags. The raw css way of preventing the space would be this: ul{ font-size: 0; } li{ font-size: 16px; }
  5. A temporary fix could be hitting the pageup key, after changing something. Your fingers should be on the keyboard anyway.
  6. @blackeye1987 Maybe this could add the functionality in a simpler way. https://processwire.com/talk/topic/7588-admin-custom-files/
  7. To find out, that the menu is not used as often as a visible one? The people who look for information will find the menu, as the page is really clearly arranged. The ones who don't, won't bother clicking to open it. The page is more of a portfolio to inform people already knowing the pianist / her work in some way. There's no need to catch all the random people who aren't interested.
  8. PageTables are handled the same as other pagefields. So you can just use something like this: $selected_page = $pages->get("something"); // Get the Page $selected_table_entry = $selected_page->table->eq(0); // Get the PageTable entry $clone = $pages->clone($selected_table_entry); // Clone the entry $new_page = $pages->get("something"); // Get the page to copy to $new_page->table->add($clone); // Add the clone to the PageTable $new_page->save();
  9. Other than for css or js usage, to make template specific selectors, there's no reason to leave this there.
  10. How does this part of your .htaccess look like? #----------------------------------------------------------------------------------------------- # OPTIONAL: Set a rewrite base if rewrites aren't working properly on your server. # And if your site directory starts with a "~" you will most likely have to use this. # ----------------------------------------------------------------------------------------------- # RewriteBase / # RewriteBase /pw/ # RewriteBase /~user/ The solution your host provided seems a little bit excessive to me. I'm not very good in reading these rules. But it seems, this is just rerouting all the subfolder requests to the actual domain. This should not be needed, if processwire does recognise the domain the right way. The second part of the list is totally wordpress related, as wordpress stores the url in the database, which processwire doesn't.
  11. I'll maybe add some dynamic updating to the otherwise static pages of my current project. My question is only, if there's some difference between this: switch($_SERVER['REQUEST_METHOD']){ case "GET": doStuff(); break; case "PUT": doStuff(); break; […] } $.ajax({type: "PUT", url: "/api/"}); versus switch($input->urlSegment1){ case "read": doStuff(); break; case "update": doStuff(); break; […] } $.ajax({type: "POST", url: "/api/update"});
  12. Hi, I currently trying to get my head around creating more dynamic pages. I've watched a few tutorials and read some stuff about api's correspondig to all the frontend technics. Now most of the api's in the tutorials use the http request methods to distinguish between the four crud actions create, read, update and delete. I'm wondering are there any differences in these requests other than you being able to read the type with php? I'm considering using urlSegments, rather than different request-types, because I don't really like the idea of reusing a request type which was implemented for other usage. Are there any real differences between those methods?
  13. Have a look at this and maybe the other tutorial there: http://processwire.com/docs/tutorials/how-to-structure-your-template-files/
  14. Also don't miss to throw an 404 error, if there are more url-segments than there should be and if the used segments are not valid.
  15. http://processwire.com/docs/tutorials/how-to-structure-your-template-files/page3
  16. Exactly, the checkbox does in fact only show up, if there is a file defined in the config.php.
  17. The checkbox is only to disable the inclusion of the globaly set file. The one which is declared in your config.php. To disable the one you set on the template level you just remove it again from the field in the backend. The global "$config->appendTemplateFile" and the template specific field you're entering the filename are independent from each other. If you want to replace _main.php with _circle.php you disable the _main.php inclusion with the checkbox and add _circle.php in the field above. This way this template now skips the _main.php and includes _circle.php.
  18. If there's no file found, nothing can be included while template rendering, so nothing changes. That's why I asked for potential spelling issues in the filename.
  19. Any errors with debug on? I just tried it on 2.5.0 and it's working as expected. Are you sure, that your file is in site/templates/ and no further subfolder and it's named _circle.php not circle.php? Could just be a typo.
  20. Haven't tried it but just like in the config? _side.php includes/something.php So in you're case "_circle.php" should work if it's directly in the templates folder.
  21. @Soma I can understand the issues with only one has_parent, but in general I do like to not get different results as superuser on the frontend. It's just convenient to be able to test the search without using a incognito browser window or logging out.
  22. It should be the template specific form of this. If you use one of those in your config, you can also disable the global setting to just use the template specific one. $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php';
  23. This is also a nice tool for the german people here: http://umsatz-programm.de/ Doesn't do invoices, but the accounting stuff.
×
×
  • Create New...