Jump to content

closer12

Members
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

2 Neutral

About closer12

  • Rank
    Jr. Member
  1. Hi. i am using the code below for showing price1 field if empty i show other text. But i need code if price1 is empty show price2 if both is empty show the text.. how i can do that i need help with php code? if ($item->price1) { echo 'From: € ' . $item->price1 ;} else { echo 'please ask'; }
  2. thank you i solved. i am beginer on pw i didnt know this
  3. How to enable enable pagination for the template? I just added this code , do i need to enable from different place?
  4. I added this code to the template , do i need to do something else? $limit = 2; // comments to display per page $start = ($input->pageNum-1) * $limit; $selector = "page=$page, sort=-created, start=$start, limit=" . ($limit+1); // find the comments. replace "comments" with the name of your comments field $comments = FieldtypeComments::findComments("comments", $selector); // output the comments echo $comments->render(); // output the pagination links if($input->pageNum > 1) echo "<a href='./page" . ($input->pageNum-1) . "'>Back</a> "; if(count($comments) > $limit) echo "<a href='./page" . ($input->pageNum+1) . "'>Next</a>";
  5. I tried paginate comments list but when i press next 404 Page Not Found error , how to solve this ?
  6. I tried with this ( pages field ) when its selected ok but when not selected it didnt work , do i make something wrong? if ($page->hotelisim) { foreach($page->hotelisim as $isim) echo "<tr>"; echo "<td>{$isim->title}</td>"; foreach($isim->children as $kucuk) echo "<td><li><a href='{$kucuk->url}' target='_blank'>{$kucuk->title}</a></li></td>"; echo "<td>{$isim->hotelclass}</td>"; echo "</tr>"; } else { echo 'Please ask'; }
  7. Hi, i am new on processwire. I have a field name is "price" .. and i want to show this field in the template if price is written, but if not i want to display text " plase ask " ... I filled placeholder text but it doesnt display. this is very simple but i dont know php , can you help me?
  8. Thank you Sinnut you are the hero.
  9. my question is very simple. I want to make a one checkbox and if this checkbox is checked i want to show some text in the page ... But i couldnt find where i can enter that text when i create a checkbox in the fields. and how to show in the template. i need very simple example for understanding. My checkbox name is : check İ added this to template : <?php echo $page->check; ?> and when i checked its show : 1 but how i can show a text ?
  10. I watched but still cant find where i can add the value and how to show in template ...
  11. Hi. I am new on processwire. I want to add checkbox fields to my page edit and when if they are selected. I want to show the text in the front page. I couldnt find where i can enter the value of checkbox and how to show in theme ? Can you give me a small example ? I took the snap from this video ( http://processwire.com/videos/field-dependencies/ ) i want to do smilar. thank you
  12. Thank you for your message, it was inspiration for me, when there is no image it gave error and i added if .. i did some thing like this and it works fine..... just can you check if its good?
×
×
  • Create New...