Jump to content

Michkael

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by Michkael

  1. Hi guys, I am migrating my website into processwire and I have now to recreate the blog part. On my homepage I have a carousel containing the previews of the last articles. The user can now do two things: 1) Navigate to the Blog page, here there is an entire page with all the written articles directly accessible by clicking on them. 2) Click the preview of the article and directly navigate to the page of the article. Look at the picture for reference. My questions are: 1) Should I do a page "blog" and all the articles being children? 2) How can I shrink the image of the article to the right size to become the preview both in the blog page and in the home page? 3) How can I reuse informations like the date, author name, title of the article both in the blog and in the home page (in the previes). 4) Do I have to create a .php file for every children page? Any additional advice is well accepted ? Have a nice day. Michael
  2. Hey Guys, first of all thanks for the awesome module! I have two questions: 1) Do I have to create a php file for each template I integrate in the field or can I code it in the php file where I put the PTE field? 2) If I have a folder with many CSS like you can see in the picture, how should I proceed? Thank you. Have a nice day, Michael
  3. It worked! Thank you @psy I have learn an important lesson about copy paste.
  4. Hi Guys, I am migrating a one pager HTML template into processwire (MEA template to be precise). If you analyse this tempalte, it is made of several sections like services, team, products; all containing an headline, a text quoted, and images with more body or simply images. I started to populate the home.php to soon realise that for each section I need an hedline, several body fields, even more fields repeated with the repeater fied. I was wondering if there is a good practice in such situations to avoid long pages, for example creating a child for each section and call them in the main page (if yes how), or other. Thank you for the support. Have a nice one.
  5. @psy Thank you. I have tried this option but i get the following error (see image): Parse error: syntax error, unexpected '$i' (T_VARIABLE) in /vagrant/src/site/templates/home.php on line 154. Here is the code: <div class="row mt-10"> <?php $i = 1; foreach($page->Services as $Service): $image = $Service->image; $colLast = ""; if (($i%3) == 0) $colLast = 'row'; $i++; ?> <!-- Services Widget Section --> <div class="col-md-4 <?=$colLast?> single-service-widget wow animated fadeInUp" data-wow-delay=".3s"> <div class="media"> <div class="media-left"> <img src="<?=$image->url; ?>"> </div> <div class="media-body"> <h2 class="subtitle"><?=$Service->headline ?></h2> <p><?=$Service->body ?></p> </div> </div> </div> <?php endforeach; ?> </div> @Robin S @Zeka Thank you, I will now try the method of the chuncks.
  6. Hey Guys, I have a repeater field containing 6 elements. Each element contains an headline, an image and a body field. The page is set up to have 3 elements in a row and 3 in a new row (see image). In the HTML code I am migrating into processwire, after 3 of the 6 elements, a <div class="row">...</div> forces the 3 new items on a new line. The problem is that I cannot put this div inside the foreach otherwise all the elements would be in a column 1x6 instead than in a matrix 3x2. I was thinking to code a counter $counter = 0 that increment during each iteration and when its value is 2 or 3 (depending on where the $counter++ is inserted) it executes the HTML code <div class="row"> and it reset the counter to 0 to allow further scalability. Right now the actual code gives the result shown in the image. Let me know if I am missing some details. Thank you guys. <section id="services" class="mea-service-section section-padding-shorter"> <div class="container"> <div class="row"> <!-- Section Titile --> <div class="col-md-6 mea-title-section wow animated slideInLeft" data-wow-delay=".2s"> <h1 class="section-titile-bg"><?=$page->headline;?></h1> <h1 class="section-title"><?=$page->headline;?></h1> </div> <!-- Section Quote --> <div class="col-md-6 mea-section-quote wow animated slideInRight" data-wow-delay=".2s"> <blockquote> <p><?=$page->body;?></p> </blockquote> </div> </div> <div class="row mt-10"> <?php foreach($page->Services as $Service): ?> <?php $image = $Service->image; ?> <!-- Services Widget Section --> <div class="col-md-4 single-service-widget wow animated fadeInUp" data-wow-delay=".3s"> <div class="media"> <div class="media-left"> <img src="<?=$image->url; ?>"> </div> <div class="media-body"> <h2 class="subtitle"><?=$Service->headline ?></h2> <p><?=$Service->body ?></p> </div> </div> </div> <?php endforeach; ?> </div> </div> </section>
  7. Thank you @Zeka it worked. Then I had another problem with apache, I got the following message: Error: Maximum function nesting level of '100' reached, aborting! error 108. I was able to solve this by accessing the ubuntu VM via ssh and adding the line "xdebug.max_nesting_level = 1000" in the file php.ini found at the path: etc/php5/apache2. I hope this might help someone else ?
  8. I will note the need of a browser without extensions. By the way, my firefox is virgin from any extension ? How should I proceed to turn it off? Is this the right file? \wire\modules\Fieldtype\FieldtypeRepeater\config.php Should I modify something in the lines shown in the picture? Thank you
  9. I have tried both with firefox and chrome an I have encountere the same problem. Here is a snip of the inspection panel.
  10. Good morning everyone, I am compeltely new on processwire and I am trying to move a website on processwire. I have created a repeated field named "Services" containing an headline, a body and image fields ("a" in the picture). I have applied the repeater field to my homepage because I need to repeat a list of services ("b" in the picture). Whenever I add a new item in the repeater field it works awesomely ("c" in the picture) but whenever I save and try to modify an entry/item, I am unable to open it. They stay collapsed no matter what I try ("d" in the picture). As you can see, Services #1 should be open and Services #2 is in the process of being opened (rotating disc on the left of the green bar). I hope you can help me. Thank you in advance. Have a nice day, Michael
  11. Hey guys, I am extremely new with HTML/php/CSS/mySQL and to better learn I want to do a small, pretty easy project. The difficulty for me now is to understand where to find the right tools/modules/API/.... so you don't have to give me the entire solution, although some hints will make the difference. Here the details about the page A scrolldown page where are shown all the post (chronologically) inserted by the users registered (and approved) to the website. It will be like a photo album for my vacations that can be uploaded live and followed by my family. My questions are: 1) How can I make a field input accessible only from verified users as follows? The new item will be seen as a childpage, or how does it work? Is this brute coding or can I find a module/app for this? -- This field input should offer the possibility to add a picture (or pictures), a title and a description. 2) How can I make the pictures low quality to speed up the navigation but when clicked, the entire article opens up (like in a popup window) with the high quality pictures? Thank you very much for all your help. And if you have any useful tip to give me, I will be greatful. (I have whatched the 2 videos of Philipp Reiner: ProcessWire Basic Guide - First Steps) Michael
  12. What should I look for? If you mean ctrl+shift+j there is nothing written on it. And yes I mean config.php
  13. Hey guys, I have just installed the begginer package offered by processwire and the homepage I see is the one you can find on the picture attached. What did I do until now? 1) Install the CKeditor on a previous processwire webstie I was testing (I found the options activable in the text 2) I had to install the GD library for php5 3) I have followed up the instruction and changed the safety of the config.ini from the git bash. What do you think it can be? I am running processwire on a vagrant lamp VM. I hope I have given the most important details. Thank you for your support, Michael
×
×
  • Create New...