Jump to content

Cengiz Deniz

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by Cengiz Deniz

  1. Guests can not see page content. But users can. Guest window: User /Admin Window And this is my template file: <h3> <?php echo "$page->title Konusunda özlüsözler"; ?> </h3> <?php $kisiler= $pages->find("template=kisi,sort=title,repeater_ozlusoz=[ozlusoz_konusu=$page->id]"); $n=1; foreach ($kisiler as $kisi) { foreach($kisi->repeater_ozlusoz as $aforism) { $tags = ''; foreach ($aforism->ozlusoz_konusu as $tag) { $tags .= '<a href="'.$tag->url.'">'.$tag->title.'</a>&nbsp; &nbsp;'; } if ($tag->id == $page->id) { echo '<p>'.$n.'. <a href="'. $kisi->url .'">'.$kisi->title.'</a> : "<i>'. $aforism->ozlusoz.'</i>"<br/>&nbsp; &nbsp; Etiketler: '.$tags.' </p>'; $n=$n+1; } } } I checked Template and Field Permisions. Cache disabled. Thank you for your help
  2. I solved. I added if ($tag->id == $page->id) $kisiler= $pages->find("template=kisi,sort=title,repeater_ozlusoz=[ozlusoz_konusu=$page->id]"); $n=1; foreach ($kisiler as $kisi) { foreach($kisi->repeater_ozlusoz as $aforism) { $tags = ''; foreach ($aforism->ozlusoz_konusu as $tag) { $tags .= '<a href="'.$tag->url.'">'.$tag->title.'</a>&nbsp; &nbsp;'; } if ($tag->id == $page->id) { echo '<p>'.$n.'. <a href="'. $kisi->url .'">'.$kisi->title.'</a> : "<i>'. $aforism->ozlusoz.'</i>"<br/>&nbsp; &nbsp; Etiketler: '.$tags.' </p>'; $n=$n+1; } } echo "<hr>"; }
  3. I am making a aporism site. In my main page I put pepople and their apohrisms. https://cdeniz.com/kisiler/ In another page I made tags. https://cdeniz.com/konular/ Finaly i am making tag page. Related aphorisms will be together. https://cdeniz.com/konular/sevgi/ and its source: $kisiler= $pages->find("template=kisi,sort=title,repeater_ozlusoz=[ozlusoz_konusu=$page->id]"); $n=1; foreach ($kisiler as $kisi) { foreach($kisi->repeater_ozlusoz as $aforism) { $tags = ''; foreach ($aforism->ozlusoz_konusu as $tag) { $tags .= '<a href="'.$tag->url.'">'.$tag->title.'</a>&nbsp; &nbsp;'; } echo '<p>'.$n.'. <a href="'. $kisi->url .'">'.$kisi->title.'</a> : "<i>'. $aforism->ozlusoz.'</i>"<br/>&nbsp; &nbsp; Etiketler: '.$tags.' </p>'; $n=$n+1; } echo "<hr>"; } I passed very big code issues but now i can not go more. In tag the list related aphorisms come but with other aphorism which are belonging to person. Tag is "Sevgi". But second aphorism should be in the list. I could not exclude. Sorry for my english. Thank you very much for your helps
  4. Finaly i did Thank You Adrian https://cdeniz.com/konular/ $sayi= $page->children->count; $kolum1=ceil($sayi/4); $kolum2=2*$kolum1; $kolum3=3*$kolum1; echo "<table border='0' width='100%'><tr><td>"; renderNav($page->children("start=0, limit=$kolum1-1")); echo "</td><td valign='top'>"; renderNav($page->children("start=$kolum1,limit=$kolum1-1")); echo "</td><td valign='top'>"; renderNav($page->children("start=$kolum2,limit=$kolum1-1")); echo "</td><td valign='top'>"; renderNav($page->children("start=$kolum3,limit=$kolum1-1")); echo "</td></tr></table>";
  5. I made Repeater and tags. But I can not get the aphorisims acording to tag
  6. thank you. i think i am stupid. since two days i could not run magical tool TracyDebugger and following code $children = $page->children(); $sayfalar= $children->filter("start=2, limit=2")->each("title"); echo $sayfalar;
  7. Yes. thanks a lot. But i hope an API like that $page->children($from,$to) this would solve that type problems easy.
  8. Your php code makes groups and order is horizontal: Your css code seems good. But only first column has dots. thank you
  9. i want to say amazing. yes it was translation mistake I can order. But problem is your code it is not vertical column order.
  10. Woow awful. But I want to vertical order. I think you should have an idea
  11. Thank You. I made following code and it works. But I am not happy. Should be better way ? $kisi_sayisi=$page->numChildren ; $satir_sayisi=floor($kisi_sayisi/ 3); echo '<center><table width="100%" border="0" cellspacing=0 cellpadding="0"> <tr align="left" valign="top"><td><ul>'; for ($i=1 ; $i<$satir_sayisi+2;$i++) { $child=$page->children("sort=title")->eq($i-1); echo '<li><a href="'.$child->url.'">'.$child->title.'</a></li>';} echo '</ul></td><td><ul>'; for ($i=$satir_sayisi+2 ; $i<2*$satir_sayisi+3;$i++) { $child=$page->children("sort=title")->eq($i-1); echo '<li><a href="'.$child->url.'">'.$child->title.'</a></li>';} echo '</ul></td><td><ul>'; for ($i=2*$satir_sayisi+3 ; $i<3*$satir_sayisi+3;$i++) { $child=$page->children("sort=title")->eq($i-1); echo '<li><a href="'.$child->url.'">'.$child->title.'</a></li>';} echo '</ul></td></tr></table></center>'; https://cdeniz.com/pw/kisiler/
  12. actualy i want to add tags to repeated aforisms. every aforism should has one or more tag (subject)
  13. I have a long list for page childrens. I want to make short list with three columns. I think it is able to with an API. How ? sample: https://cdeniz.com/kisiler.html
  14. Works perfect. Thank you very much. I feel I am in the best place https://cdeniz.com/pw/ozlusozler/voltaire/ Second step : Every aphorism should have one or more topics fields. Is it possible ? Thank you again
  15. Hello, I am newbee. This is my first message. I am trying to learn PW. After modx, I loved it very much. My question: I am tryin to make a site which shows people and their aforism. I made a field but just one aphorism can input. How can I add more data to a field ? This is my previous page which made with modx : https://cdeniz.com/k105/Nazim-Hikmet.html Thank you
×
×
  • Create New...