Jump to content

slkwrm

PW-Moderators
  • Posts

    321
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by slkwrm

  1. The first thing that comes to my mind is : echo '<h2>Amount $' . $grant->amount_approved . '</h2>';
  2. You should substitute trabajos-parent with the selector to chose the page that is a parent of your Trabaho 1...n pages. In your case you don't even need to use a selector, it should be: $trabajos = $page->children("template=trabajo, sort=sort"); and if you only have pages with this 'trabajo' template under your trabahos page, you don't need to spacify it in your selector, so it shrinks to: $trabajos = $page->children("sort=sort");
  3. Try to add sort option to your selector (sort=sort or sort=-sort for reverse order): $pages->find("template=trabajo, sort=-sort");
  4. This on is pretty thought-provoking: Dive into Responsive Prototyping with Foundation Edit: Oh, and this one even more: Responsive Comping: Obtaining Signoff without Mockups
  5. There was a typo here (you don't need that second dollar sign), so it should be: echo "Amount {$grant->amount_approved}"; As for the date, I think you need this instead: $myDate = $grant->getUnformatted("cheque_date"); $myDate = date("Y-m-d H:i", $myDate); echo "<p>Date granted: $myDate</p>";
  6. In order to start building websites with ProcessWire you don't have to know much PHP, just basics. Check out this thread. To format your date do this (you may want to change format - check out the link posted above): $myDate = date("Y-m-d H:i", $grant->cheque_date); echo "<p>Date granted: $myDate</p>"; You can check the field name in setup/fields to make sure they are ok - field names are not visible on your screenshot, only their titles. Also you can install this module to help you navigate from inputfields to corresponding fields quickly http://modules.processwire.com/modules/helper-field-links/
  7. Hi, Galaxy You have to format your date before output: php.net/date Make sure that your repeater field with the is called "amount_approved"and it conteins data.
  8. You can have your user's page name the same as the user name. Not unique names can cause problems only when we talk about the pages belonging to the same parent. You can always check if the page name is unique using something like: if (!$pages->find("parent=$myParent, name=$myPageName, include=all")->count()) { //the page with this name doesn't yet exist within specified parent so it's safe to add myPage under myParent... } Yes, you can extend user template with additional fields. Just go to templates and choose to show system templates in the filter option.
  9. Remember to sanitize you title: $sanitizedTitle = $sanitizer->pageName($this->contact->title) $this->contact->name = $sanitizer->pageName($this->contact->title); @Ardian: yes, totally right, it's necessary to check if the page with this name already exists or eliminate errors by adding a numerical suffix.
  10. Hi, Vineonardo. You should remove 'title' item from the array on the line 80 of the module: $this->set('skipFields', array('title'));
  11. @Matthew Haven't tried this new feature yet, but I'm pretty sure array option is here just to make it usable the way you pointed. Gonna try it soon Nice addition!
  12. Well... That was good It looks logical that Microsoft appeals to such a criterion after they've made this promo:
  13. slkwrm

    Karena Savannah Cramer

    Congratulations, Ryan! Best wishes to your daughters and your family! Can we hope you'll publish a post called "Real-life multitasking for web developers"?
  14. Try to use add start=0 to your selector so it looks like this: $positionen = $pages->find("template=tabelle_position, limit=10, start=0");
  15. slkwrm

    Hanna Code

    Wow! Great module, Ryan. Gonna create a bunch of snippets for quick prototyping and trying things. Expect a new wave of MODx'ers on the forum. These folks love using code snippents the way Hanna Code allows it! Edit: Pete, we had almost the same thought!
  16. @doolak You may try this. I took my code and modified it a little so it may not work out of the box. //parent of your galaries $galleryHome = $page->parent; //all your published gallery pages (make sure you use the same sort option as in your template when output) $galleries = $galleryHome->children; //page being viewed $currentPage = $page; //number of galleries per page $galleriesPerPage = 5; //index of the page in array $PageIdInArray=NULL; //the number of the page your current gallery belongs $pageNum=0; foreach($galleries as $i => $p) { //iterate every galleriesPerPage time if (($i%$galleriesPerPage)==0) { $pageNum++; } // if ($currentPage->id == $p->id) { $PageIdInArray = $i; break; } } //if we found our page in array and $pageNum<>0 if ($PageIdInArray && $pageNum) { //construct url to the galleris landing page $url = $galleryHome->url . "page" . $pageNum; echo "<a url='$url'>Back to galleries</a>"; }
  17. Hi, Valan. I guess you should try to log the inputfield name in a cycle just before LanguageSupport.module on line 380 so you could understand when it breaks. Also try to substitute line 379 temporary just to see if the problem remains: if(!$value && (!$inputfield instanceof Inputfield)) continue; Seems like you have some problem with an instance of a wrong class. Have no idea what causes this error. Cheers.
  18. @Kongondo: Brilliant review! You've covered pretty much all key points here. I remember reading your Wayfinder book, which was one of the first things I had read when I started with Evo in 2009. It was a good read, thank you for that! @Jeroen: Soon after Revo came out I moved from MODx so don't know much about contexts. These topics may be relevant for you: http://processwire.com/api/modules/multi-site-support/ - two ways of setting up multiple sites http://processwire.com/talk/topic/1025-multisite/ - Apeisa's multisite module mentioned in above article http://processwire.com/talk/topic/2979-multi-language-page-names-urls/ - new multi-languge names feature. Currently it's available only in dev branch and is not recommended for production yet. This new functionality makes possible to have unique URLs for each language used by your site with no need of making separate tree for each language. All your multilingual content resides within one page using multi-linguage fields. When the page is viewed in the front-end the content is shown depending on the current language (which is detected by a languale-specific URL). Really excited about it! I think it's very close by its sense to "language contexts" in MODx you mentioned. API respects the context of the current language so it takes away the burden of taking care of language-related logic in your templates.
  19. Hi, Doolak. I think there's some confusion going on Search module (ProcessPageSearch)is purposed solely for back-end usage: it runs when you hit search in the admin interface (and you get to the back-end search page whare you can see the default settings you mentioned). The default settings of this module don't affect your template code, they are totally independent. Your selector, access rights and page status are three things that define the results you get when you search via api. It seems though, there's no way to search repeater fields with ProcessPageSearch at the moment. Correct me if I'm missing something.
  20. slkwrm

    fantastique.ch

    Great work, Dragan! Really nice use of Foundation here. When someone posts a new website and doesn't even mention it's mobile-ready, I attribute it, at least partly, to the greatness of ProcessWire . "So All Drupal & Joomla lover", please, take notes.
  21. Hi, Alex. I think that the following code should work: $found = $pages->find('myrepeater.summary*=hello'); Maybe you should try this: $found = $pages->find('myrepeater.summary*=hello, include=all'); But then it doesnt check access rights and published/unpublished state of your pages. Maybe you should post your code here so others can see it.
  22. Congratulations, Ryan! Best wishes to you and your family! Sorry for not having been around for a while on the forums: had to travel recently to another city for my work. Hope to be back soon. So many great stuff going on here!
  23. Hi, Mike. For some reason I can't see Processwire in Best Free CMS category. Why so?) I'd like to vote for it in this category too
  24. I often mess something up myself Glad you found it useful.
  25. If you use an admin theme other then default try to switch it off by renaming its folder. You can also try checking last modified core and template files, maybe something went wrong there. Try to figure out what changes were made before this happenned.
×
×
  • Create New...