Jump to content

ottogal

Members
  • Posts

    340
  • Joined

Everything posted by ottogal

  1. @AndZyk I completely second what you're saying. What's most appealing with ProcessWire is (was?) its independency of third party assets...
  2. I fully agree.
  3. Good hint. I didn't know it - that is, I don't know nothing about URL segments. (So shouldn't give any advices... sorry!)
  4. You're right. Bad idea.
  5. A workaround - though not really pretty - could be: Assign a new template to the page "Actual home" using this template file (say) redirfirstchild.php: <?php namespace Processwire; if($page->numChildren) $session->redirect($page->child()->url); That would redirect a request of the "Actual home" to the "New home" page. Downside of this: The URL would become something like "yoursite.com/actualhome/newhome/" (whatever pagenames you use). To suppress the "actualhome/" part, you perhaps could use URL segments (I don't have any experience with them). Edit: And you'd keep the "Actual home" page in the tree (content removed, of course).
  6. Have a look to the Cheatsheet to find ways of selecting determined parents of a page, from simpler ones to this smartest one: http://cheatsheet.processwire.com/page/built-in-methods-reference/page-parent-selector/
  7. Your second use of if($prod->images) echo " is unnecessary (since you get only to this point if the condition is true). You could replace this by if($image) echo" Edit: Like in the code you cited first...
  8. Obviously the error is thrown already with the line $image = $prod->images->first(); (not only when you try to echo the image). So you should do a check for $prod->images before you apply ->first()
  9. I have no answer to your question, but would like to mention that using flags as language indicators is not the best idea: why-flags-do-not-represent-language
  10. Create a Hanna Code named cyan of Type PHP with an attribute text and the following code: <?php echo "<h3 class='cyan'>$text</h3>"; ?> Then the call would be [[cyan text='This is cyan text']]
  11. Salve franciccio-ITALIANO, maybe you're looking for something like this: https://processwire.com/talk/topic/7723-protecteddevelopmentmaintenance-mode/ (Or google for "processwire maintenance mode".)
  12. The homepage processwire.com is now displaying correctly 3.0.62, but not so the Download page processwire.com/download. Why not leave out the version numbers on the buttons, just saying "The newest master version of ProcessWire" etc.? And adding a link to Release Notes for more details...
  13. When there is the need to check a new participant if he matches one of the ones enrolled previously, I think you can't avoid having an identifier for every participant. Edit: Assuming every participant is a page (the PW way ), the page's ID would be the natural unique identifer for your purpose.
  14. Why not give the Page 1.1 a modified template with the Family setting "May pages using this template have children?" set to "No"?
  15. Using PW 3.0.41, I made a successful upgrade of AOS from v0.1.5 to v1.4.3 via the backend; but the module's settings page continues showing v0.1.5. (Clearing the compiled files and refreshing doesn't help.) Edit: Logging out and in again helped.
  16. Thank you very much! EDIT: Works like a charm!
  17. Hi @Macrura, would you mind to reveal more details of your obfuscation function? I would highly appreciate it.
  18. @evanmcd You're right, of course - sorry for my stupid intervention.
  19. There is a great tutorial by @kongondo that might be helpful for situations like yours: https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/
  20. Thanks, I'll give it a try.
  21. @evanmcd You say So it seems you get the head tag twice.
  22. Yes, I considered this. But indeed each video has to be fetched from it's own page (child of one page "video pool")...
  23. Thank you, @Robin S, for this nice module. But I'm not sure I can use it for my special case. To let my editor user embed a video from a internal page into a textarea (CKE), he would insert a HannaCode like this: [[video source='LINK']] Here the editor has to doubleclick the string LINK to select it, and click the "Link" Button of the CKE. The modal window "Insert Link" opens, and the user just needs to click "Select Page" to choose the page containing the wanted video in a field of type File. The HannaCode "video" itself would wrap the file data with the necessary code provided by the videoplayer script in use. This all works fine - even if I admit it's not very elegant. After installing the HannaCodeDialog module, the string LINK appeares in the input field "source" of the dialog, of course. But there it's not possible to evoke the Insert Link action of the CKE. (And if there exist already some other calls of this HannaCode in the CKE-textarea, they also would become the functinoality of the module, and those LINKs were not editable anymore, too.) So I ended in uninstalling the module. May be this could be solved by using some dynamic options - I didn't dive into these yet. And of course, very likely my way to use HannaCode at all is a bit stupid, anyway...
  24. I fear it's not that simple.
  25. The person who marked this as CON did not understand Processwire...
×
×
  • Create New...