Jump to content

Timberwolf

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Timberwolf

  1. yes but now i'm pointed to the next questoins... i'l try to find it with you google link
  2. you was right. thanks. I thinks this can be closed and marked as solved
  3. Hi Bernhard, maybe it is to easy and maybe i try to find more complexity as it is. What i ment with "pinned" attached as screen.
  4. Hi Dave, thank you for reply. I checked the site, and yes there was a little confusion about $page and $pages. Thank you for that. But are i'm right that i have to use "template=news" to select the right table? I have in my backend 4 fields which are filled and which i try to select. First i had written all of that in normal Database queries but that seems not good and again coding standards.
  5. Hello, i'm new to processwire, but not to php and all the LAMP Stuff. To answer all Pro's questions, yes i used the Search but found nothing that fits to my Issue. Current i try to build ym own Blog/news Page. I created ym own template file called news.php and pinned it at my Template in the Backend. For now all fine. I want to use twig as template Engine. I also found my testentry for nws with phpmyadmin in the Database. My Issue is that if use the $page or $pages i'll never get any Data from DB or Pages or else. Could anyone please tip with a finger on my false Code? <?php namespace ProcessWire; $urlString = $page->url(); $twigPage = ""; switch($urlString){ case "news_feed"; $pages->get("/presse/")->find("template=news"); echo $twig->render('pages/news_feed.twig', $tpl_vars); break; case "news"; $resultSet = $pages->find("template=news, news_id=1"); echo $twig->render('pages/news.twig', $tpl_vars); break; case "newsstart"; $resultSet = $page->get("template=news, sort=-news_created, limit=3"); if ($resultSet) { while ($row = $resultSet->fetch()) { $nachricht = message($row); array_push($rows,$nachricht); } } echo $twig->render('pages/newsstart.twig', $tpl_vars); break; case "newsarchive"; $resultSet = $page->get("template=news, sort=-news_created"); echo $twig->render('pages/newsarchive.twig', $tpl_vars); break; default: $resultSet = $pages->get("/presse/")->find("template=news"); echo $twig->render('pages/news_feed.twig', $tpl_vars); break; } Kind Regards
×
×
  • Create New...