Jump to content

kongondo

PW-Moderators
  • Posts

    7,404
  • Joined

  • Last visited

  • Days Won

    140

Everything posted by kongondo

  1. Great! Wanze beat me to it....again... . The following line renders posts... $content = $page->body . renderPosts("limit={$page->quantity}");
  2. Kunane, If you have the time, when you are done, please do a short write-up how you approached/accomplished this. It will help others . Thanks!
  3. kongondo

    la2050.org

    Nice site! well done
  4. Aah...thought about this but PW only suggested other fields as available to add.
  5. You can also see it in the URL when editing the page . Or echo echo $page->id; in your template file when developing . Of course, delete code when done
  6. Rule of thumb: many things -> foreach one thing -> grab and echo directly In your case, if what you want is on another page echo $pages->get(123)->enlace; //123 is ID of that page You can also use path to that page instead of ID. Please have a look at the API documentation. Everything to get your started is explained there http://processwire.com/api/. Look at variables and selectors in the first instance. Edit: Quick addition for newbies - what Harmster wanted in the first post were the names and the values of Fields which is different from what gfdesign needs
  7. Hmm...I think you guys have convinced me to leave Foundation 3 for Kube . I like the "split" css class as well.
  8. Diogo, Small typo: $config->url->templates should be $config->urls->templates - you are missing the "s"
  9. Thanks for this . Btw, I don't wish to steal k07n's thunder but I just used Word's "Save as PDF" and the resulting file is only 333KB (and text searchable). How did you convert yours?
  10. Looking nice totoff. Is this only for frontend or you are doing Admin theme as well?
  11. Is that a single page reference field or a multiple one? When editing that field, under input, have you checked the settings under "parent of selectable pages"? Also, still under input, have you checked that you have the correct type "input field type"? i.e. single type for single page reference field or multiple select type for multiple page reference field. There is a type that doesn't play well with PageListSelect. I can't remember which one but PW tells you. Could that be it? What about radio input select (for single pages), does that work? Are other none-page fields saving correctly? Is this post related to your other one here http://processwire.com/talk/topic/3767-new-fields-dont-appear-in-template/? If yes, it is good to keep related stuff in one post...
  12. Let's see that Dashboard then, eh, Pete
  13. Ryan, Any chance TinyMCE4 will appear before PW 2.5 2.4? Edited: meant 2.4
  14. Roelof, A bit more description about what you want to achieve would help. I am not sure what the problem is. These tools are also helpful: http://validator.w3.org/ http://jigsaw.w3.org/css-validator/
  15. $page or $pages work fine in Template Files as long as the they are outside functions. Your Template File can contain functions. Use wire() method in functions (or in your own class). Hence, both wire() and $page/$pages can appear in the same Template File if you so wish. EDIT: Apeisa was faster
  16. As a btw, the alternative syntax to wire('pages') is $wire->pages http://processwire.com/api/include/
  17. Ovi, Thanks for sharing this. Lines 57 and 60 in your code are identical. Is that meant to be the case?
  18. Some stuff, probably related to this discussion... http://processwire.com/talk/topic/2959-head-and-footinc-based-on-html5-boilerplate-for-basicexampleprofile/ http://processwire.com/talk/topic/2284-responding-to-responsiveness/ http://processwire.com/talk/topic/3442-how-do-you-layout/ (this one was hijacked by myself and others )
  19. @PWired. Thanks. I am humbled. I try to do my bit. Though, truth of the matter is that I've taken much more than I've given back. There's some great people in this community; I am awed by their generosity.
  20. Try this (subfield property) $products = $pages->find("template=product, [more criteria here] ,sort=-product_versions.price"); See these examples from http://processwire.com/api/fieldtypes/repeaters/. buildings is the name of the repeater. feet_high, num_floors and year_built are the fields. // find all pages that have at least one building with a height > 500 feet $buildings = $pages->find("buildings.height>500"); // find all pages that have a building made in 1940 with at least 20 floors $buildings = $pages->find("buildings.year_built=1940, buildings.num_floors>20"); // find all pages using the basic-page template with at least 1 building $buildings = $pages->find("template=basic-page, buildings.count>0") Other info (selectors) field.subfield=value
  21. Here's the presentation to TinyMCE 4 http://www.tinymce.com/presentation/
  22. Very nice! Thx for sharing.. Shame it doesn't do PHP from what I can tell..
  23. OK. Your statement confused me...Of course you meant in this particular case Gnuey needed to do the renaming
  24. This is a quick tip for my front-end developer peeps and other wanna-be-coders like me....I have been seeing this "strange" <?php endif; ?> code in some code here in the forums and in some template files. <?php if ($a == 5): ?> <p>A is equal to 5</p> <?php endif; ?> //In the above example, the HTML block "A is equal to 5" is nested within an if statement written in the alternative syntax. The HTML block would be displayed only if $a is equal to 5. //The alternative syntax applies to else and elseif as well. I have largely ignored it until I read about it more and wow! I wish I knew about it earlier. Anyway, you might want to read up about it. In a nutshell, it makes mixing PHP and HTML much more friendly in some cases. It helps avoid echoing out a lot of HTML but instead gives you flexibility to just type them out normally... A few resources to help you understand the alternative syntax. http://php.net/manual/en/control-structures.alternative-syntax.php http://www.brian2000.com/php/understanding-alternative-syntax-for-control-structures-in-php/ http://www.stoimen.com/blog/2010/03/10/php-if-else-endif-statements/ http://www.trans4mind.com/personal_development/phpTutorial/controlStructures.htm http://stackoverflow.com/questions/564130/difference-between-if-and-if-endif http://stackoverflow.com/questions/6023418/when-do-i-use-if-endif-versus-if http://www.trans4mind.com/personal_development/phpTutorial/controlStructures.htm
×
×
  • Create New...