Jump to content

OpenBayou

Members
  • Posts

    85
  • Joined

  • Last visited

Everything posted by OpenBayou

  1. Notice no difference between all four, they look the same. I changed quality to 100.
  2. I'm still having problems with images, I have upscaling off, sharpening is strong, quality at 95 and I'm still having problems. The main problem I'm having is you can see wavy lines on images that are slanted. I'm attaching an below as an example of the problem. Thanks.
  3. Hello, Is there a way to stop Images from begin compressed when uploading? I'm seeing images look soft and blocky. I tried doing the following (with $child as a 'foreach' and image filed called 'post_image') <img src="<?php echo $child->post_image->first()->size(200,0,'upscaling'=>false)->url;?>"> but it resulted in an internal error. Thanks,
  4. <?php echo $child->deals_store->id?> That did it!
  5. Update: I was able to print the option that was selected but I still need some minor help. <?php foreach($pages->find("parent=deals") as $child) { ?> <?php echo $child->deals_store->title;?> <?php } ?> I have three options as of now to select: 1=option A 2=option B 3=option C <?php echo $child->deals_store->title?> For example: If I have a page with '2' selected, the above code will print the option that's selected: 'option B'. Instead of showing the title, I would like to show the number '2' instead of the title 'option B'. Thanks again for the help.
  6. Hello, I need help with the options field, I looked online and the examples have confused me. I have a drop-down option called 'deals_store' and it has three selections to choose from: 1,2,3. How do I check if the page has a field called 'deals_store' and the option is 1? This is what I've done so far: <?php if ($page->deals_store = '1'):?> show <?php else:?> hidden <?php endif;?> Thanks.
  7. So this is what I've done so far. It does work but anything better or other suggestions is greatly appreciated. // the parent <?php foreach($pages->find("template=recommendations") as $parent) { ?> <?php echo $parent->title;?> <?php } ?> // children <?php foreach($pages->find("parent=recommendations") as $child) { ?> <?php echo $child->title;?> <img src="<?php echo $child->post_image->first()->size(200,0)->url;?>"> <?php } ?>
  8. Yes on both. I'm new at ProcessWire and I'm just looking to see what's available.
  9. Hey, I'm trying to find a way to see what variables are available using 'print_r' but I get a blank page. This is the code I'm using so far: <?php foreach($pages->find("parent=recommendations") as $child) { ?> <?php echo $child->title;?> <img src="<?php echo $child->post_image->first()->size(200,0)->url;?>"> <?php } ?> I just want to see what's available in $child. When I try to do 'print_r($child)`, I get a blank page. Like a white screen of death. This is what I have so far: <?php foreach($pages->find("parent=recommendations") as $child) { ?> <?php echo $child->title;?> <img src="<?php echo $child->post_image->first()->size(200,0)->url;?>"> <pre> <?php print_r ($child);?> </pre> <?php } ?> Thanks for the help.
  10. This is starting to become an awesome CMS of mine. Thanks.
  11. Hello, This is minor question not really important. I have a field called 'item description' that I use on multiple templates. Is there a way to have a different title on that field depending on the template? Example: on template a, have the field title called Description and on template b, have the field called Example? Or is it easier to have a different field on different templates? Thanks
  12. This is too complicated for me but it's a start for me to work on.
  13. Doesn't show anything. `<?php echo $child->parent->title;?>` does show the title but I still have problems. The title of parent page does show up if it's inside the loop (foreach) but it shows the title on each post. Example: if I have two posts, it looks: Parent page title Image Title Parent page title Image Title Looking for a way to show it once.
  14. Hi, How do you get the title of a parent page? If I use `<?php echo $page->parent->title;?>` it shows the title of the parent page on each post. I'm just looking for a way to show it once. This is what I have so far. <?php foreach($pages->find("parent=recommendations") as $child) { ?> <?php echo $child->title;?> <img src="<?php echo $child->Image->first()->size(200,0)->url;?>"> <?php } ?> Thanks and happy new year.
  15. Hey everyone, I'm new at using ProcessWire and starting to get a better understanding at how this works (and enjoying what I see). However, I'm having problems with displaying images on my theme. The field is called 'Image' and I'm looking for ways to display the URL to the image attached to the page. This is the code I have so far: <?php foreach($pages->find("parent=recommendations") as $child) { ?> <?php echo $child->title;?> <?php } ?> First thing I'm having problems with is displaying the image. If I do `<?php echo $child->Image;?>' it just shows the filename.jpg. If I do '<?php echo $child->Image->url;?>`, it just shows the directory (/site/assets/files/1110/). First question is i'm looking for a way to display the full path of the image. Second question I have is how do you show different sizes of the image. Thanks and happy new year.
  16. One more question. I'm trying to find a way to show the URL of an image that's in the page. The image field is called Image. I tried <?php echo $child->Image;?> and all it will output is the name of the file (image.jpg).
  17. Hi, I'm creating my own theme and need help with showing all pages from a parent that's called recommendations. Thanks for the help.
  18. Plan B: Is there a way to add a class to a body based on template on the page? I have three templates in theme: home, recommendations and ads. Example: If the main page uses 'home' template: <?php if template=home : ?> <body class="home"> <?php endif;?> Hope this clears it up.
  19. Hi, I'm new to ProcessWire so forgive me if this question has been asked. In WordPress, there's an option to show all classes of any div. For example, if this is my body: <body <?php body_class(); ?>> it outputs the following: <body class="page page-id-2 page-parent page-template-default logged-in"> Does ProcessWire have something similar? Thanks!
  20. Hello, What's the best way to show child pages on my editor? I'm trying to find a way to show all child pages from a parent on the editor. Thanks
  21. Repeater module is perfect for what I need. Thanks
×
×
  • Create New...