-
Posts
41 -
Joined
-
Last visited
Everything posted by Cengiz Deniz
-
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> '; } if ($tag->id == $page->id) { echo '<p>'.$n.'. <a href="'. $kisi->url .'">'.$kisi->title.'</a> : "<i>'. $aforism->ozlusoz.'</i>"<br/> Etiketler: '.$tags.' </p>'; $n=$n+1; } } } I checked Template and Field Permisions. Cache disabled. Thank you for your help
-
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> '; } if ($tag->id == $page->id) { echo '<p>'.$n.'. <a href="'. $kisi->url .'">'.$kisi->title.'</a> : "<i>'. $aforism->ozlusoz.'</i>"<br/> Etiketler: '.$tags.' </p>'; $n=$n+1; } } echo "<hr>"; }
-
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> '; } echo '<p>'.$n.'. <a href="'. $kisi->url .'">'.$kisi->title.'</a> : "<i>'. $aforism->ozlusoz.'</i>"<br/> 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
-
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>";
-
Adding more than one data to a field
Cengiz Deniz replied to Cengiz Deniz's topic in Getting Started
-
Adding more than one data to a field
Cengiz Deniz replied to Cengiz Deniz's topic in Getting Started
thank you. How can I get all apohrism list ? -
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;
-
Yes. thanks a lot. But i hope an API like that $page->children($from,$to) this would solve that type problems easy.
-
Your php code makes groups and order is horizontal: Your css code seems good. But only first column has dots. thank you
-
i want to say amazing. yes it was translation mistake I can order. But problem is your code it is not vertical column order.
-
Woow awful. But I want to vertical order. I think you should have an idea
-
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/
-
Adding more than one data to a field
Cengiz Deniz replied to Cengiz Deniz's topic in Getting Started
-
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
-
Adding more than one data to a field
Cengiz Deniz replied to Cengiz Deniz's topic in Getting Started
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 -
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