Jump to content

diogo

Moderators
  • Posts

    4,314
  • Joined

  • Last visited

  • Days Won

    80

Everything posted by diogo

  1. Sempre às ordens
  2. $area_alias = $sanitizer->text($input->get->area); $area_page = $pages->get("alias=$area_alias"); $matches = $pages->find("title|body|sidebar*=$q, parent=/catalogo/produtos/, arealimit=50, id!=1, area=$area_page"); I think this is what you want, but I'm not sure. Tell me if I misunderstood everything. EDIT: See Ryan's corrections to my code some posts below
  3. It isn't outputting anything... can you try what I said on the post above? echo "<br>{$page->title}<br>{$page->template}<br>"; I also noticed that on your code, there is a problem with the tags sequence: You have <div><a><img/></div></a>, and should be <div><a><img/></a></div>
  4. This was just for testing if you can reach the field at all. Apparently not. Can you replace it for this, and see if there is any output? echo "<br>{$page->title}<br>{$page->template}<br>"; This should output the title and the name of the template of the page. ---- To post the html output, go to "view source" on your browser, and look for the piece of code from the gallery. Maybe you should even deactivate the javascript plugin before, so we are sure that the html is correct (just unlink it on the head of the html).
  5. Can you post here the html output? Edit: I had a small typo on my code, but I don't think that was the problem. I copied your code on my testing PW install, and I get the images on the page. Tell me if you get any output if you put this right after <?php echo $page->my_images;
  6. Not sure if I get it. Can you put here an example of how you want the table to look like?
  7. what if you use repeaters for the links, instead of a text field? Then you can do this: $pages->find("articleImageFiles.count|articleImageLinks.count>0);
  8. Well... you can also keep the nav always visible with some js.
  9. I tend to design with code, and in PW, is actually very easy to organize the content because of the tree approach. I usually do a rough draft with Inkscape as a starting point. When I work with another designer, I usually get just a PDF from her. I actually prefer it like this, because there isn't much point on designing everything by the pixel these days
  10. If your concern is mainly the prices, you could put something like "Have a look at our prices" linking to that part. Would be even more effective.
  11. see my edit to the other response
  12. About the website: I like it, but I wonder if the navigation is really necessary... The site works very well only by scrolling, and the navigation can give people the feeling that there is something more than this page, and make them scroll up to press the links only to find out that they have already seen everything. edit: I noticed that you removed the navigation on smaller screens. Works great Maybe you could replace it on bigger screens by a sentence... like a slogan, or so... or by something immediately useful, like the written address.
  13. oh, that "r" makes all the difference, also in how you pronounce both words. I don't think a German speaking person would make that connection.
  14. Ok, so now, Go to setup>fields, and create a new field with type "images", give whatever name you want, let's say "my_images". Go to setup>templates, choose your index template, and add this new field to it. Open your index page on the pages tree, and populate the images field with some images. On the index.php, go to the code of the galery, you must have something like this (I'm assuming that you have prettyPhoto already working): <!-- taken from the prettyPhoto site --> <a href="images/fullscreen/1.jpg" rel="prettyPhoto[pp_gal]" title="You can add caption to pictures."><img src="images/thumbnails/t_1.jpg" width="60" height="60" alt="Red round shape" /></a> <a href="images/fullscreen/2.jpg" rel="prettyPhoto[pp_gal]"><img src="images/thumbnails/t_2.jpg" width="60" height="60" alt="Nice building" /></a> <a href="images/fullscreen/3.jpg" rel="prettyPhoto[pp_gal]"><img src="images/thumbnails/t_3.jpg" width="60" height="60" alt="Fire!" /></a> <a href="images/fullscreen/4.jpg" rel="prettyPhoto[pp_gal]"><img src="images/thumbnails/t_4.jpg" width="60" height="60" alt="Rock climbing" /></a> <a href="images/fullscreen/5.jpg" rel="prettyPhoto[pp_gal]"><img src="images/thumbnails/t_5.jpg" width="60" height="60" alt="Fly kite, fly!" /></a> replace all those images by this: <?php foreach($page->my_images as $image){ echo "<a href='{$image->url}' rel='prettyPhoto[pp_gal]'><img src='{$image->width(60)->url}' width='60' alt='{$image->description}' /></a>"; } ?> In the previous example, the thumbnails will be miniatures of the pictures with 60px width and variable height. If this is not what you want, follow along: Install Apeisa's Thumbnails module http://modules.proce...ype-crop-image/ (or even better! install Soma's amazing "Modules Manager" http://modules.proce...odules-manager/ and from there install the Thumbnails module). Go to setup>fields, choose the newly created my_images field and change its Type to "Cropimage". Go to the "INPUT" tab on the same page, and on "Thumbnail Settings" (bottom), change from "thumbnail,100,100" to "thumbnail,60,60" (or whatever you want). Open your index page on the pages tree, and now you will have a thumbnail option for each of the images you uploaded before. Crop your images as you wish. On the index.php file change the previous code to this: <?php foreach($page->my_images as $image){ echo "<a href='{$image->url}' rel='prettyPhoto[pp_gal]'><img src='{$image->getThumb('thumbnail')}' width='60' height='60' alt='{$image->description}' /></a>"; } ?> Et voilà, that should work edit: changes from this "60" to this '60' on the last snippet
  15. You have this index template working on the homepage already? When you open your website, you see the content of your html?
  16. Have a look at this thread http://processwire.com/talk/topic/490-how-to-reset-your-password-how-to-enable-the-forgot-password-function/page__hl__%2Bforgot+%2Bpassword
  17. On the selector the category must be a page. So be sure that you get the page of the chosen category like this $cat = $pages->get("parent=/category/, title=chosen"); Then you can do your search like this: $result = $pages->find("parent=/articles/, body*=$query, categories=$cat");
  18. But would be nice if everything would be kept in one place. We have also the tags. Maybe if each new module post defines a tag to be used when referring to it...
  19. diogo

    Bonetics

    Ok, here is what happens between 700px and 480px: Also, not that important since it only happens under 360px, the titles break in a not very elegant manner in small screen sizes: LOVE FOR CREATION, SMALL AND BIG This is so easy to fix that I think it's worth it: h5{ white-space:nowrap; } Or maybe even better: <h5><span>Love for creation, </span><span>small and big</span></h5> h5 span{ white-space:nowrap; }
  20. diogo

    Bonetics

    Very nice Adam!! I'm leaving in one minute, but just wanted to say that the animation has some problems under the 760px breakpoint. I can can test and report later, ok?
  21. Maybe you should try to put some text dynamically, even if you don't need it, just for having a feel of how PW works with simpler stuff. At the same time, finish your html with the images because PW won't impose anything to you. We'll be here to help
  22. I like this forum. I've been reading some posts on mobile during the vacations, and must say that it works great. The code bug is very annoying, but the smiley issue doesn't bother me at all. I actually prefer typographic smileys, but don't want to be the only one disabling the faces
  23. There isn't a dropdown field in the back end, but you can do the same with a Page FieldType. You will have to create a simple page (only title) for each option under the same parent, create a Page FieldType pointing at that parent, and put it on your template. Use the titles of these pages as your options. The page object will be returned as a result of a call to the field, so you will need to do this (considering that form_template is the page field): $form->template = $templates->get($page->form_name->title); Honestly, I still think that this method is not intuitive at all. But this was discussed already in other threads, and I do agree that it works well and that it's very easy and fast to create pages as options. I'm assuming you meant the 2nd line, because I don't see any logic if it's the 3rd.
  24. I'm not sure what you mean by the pageArray method, but if what you mean is the Page FieldType, you should be able to do this: $color = $pages->get("color_code=0x00f"); $page = $wire->pages->get("parent=/boxes/, color=$color"); edit: oh, didn't see the previous posts... they appeared while I was writing
×
×
  • Create New...