Jump to content

gregory

Members
  • Posts

    95
  • Joined

  • Last visited

Everything posted by gregory

  1. Hi guys. I would like to show only the first image as a preview of a slideshow. The code below shows the first image but is repeated. Do you know a solution? Thank you //Call image foreach($story->galleria as $img) { echo "<img src='{$story->galleria->first()->url}' alt='{$story->galleria->first()->description}'>"; }
  2. Hi guys, I need help. how do I translate Next Page? <?php if($page->next->id) {echo "<div class='float-right'><a class='button' href='{$page->next->url}'> Next Page </a></div>";} ?> I usually use this: <?php $lang = $user->language->name; if($lang == 'default') {echo "Next Page";} else {echo "Pagina successiva";} ?> or <?php echo __("Next Page"); ?> Thanks
  3. Hi, does the module also support multiple languages?
  4. Now the new websites I build them only with Processwire. It is a powerful CMS and the community is very serious and professional. ?
  5. To be exact, I did this: if(count($story->imagefieldname)) { ... } Thank you again!
  6. Thanks so much! Now it works perfectly. Can I offer you a coffee? ☕
  7. It is right (sorry I come from WP). But in my case I have a page with a list of articles and the image field is also called in the article that has no image.
  8. Thank You for your response. In my case I need to write this, because I am in the post archive: if ($ story-> imagefieldname) { ... } But it does not work as it should because it recalls an image in other posts ...
  9. Hi guys, how can I do with php to show the div containing the image (if the image exists)? Thanks for your help.
  10. Hi guys, is it possible to set a menu item that points to an external url? Thank you
  11. Thank You @Zeka I solved with Code Internationalization (i18n)
  12. Hi, I'm working on a bilingual site (it / en). I would need to automatically translate the classic "Continue reading". How can I do? Thanks in advance. <?php $stories = $page->children("limit=3, sort=-date"); foreach($stories as $story) { echo "<div>"; echo "<h2><a href='{$story->url}'>{$story->title}</a></h2>"; echo "<div>{$story->summary}</div>"; echo "<a href='{$story->url}'>Continue reading</a>"; echo "</div>"; } ?>
  13. I solved by excluding pages. Great!
  14. Hi Soma, I need to create a menu with the centered logo as in the attached example. My idea is to create two different menus. How can it be done? Thank you
  15. Hello guys, how can I view the image field? I need to view the Image associated to the post of the news. Thank you
×
×
  • Create New...