Jump to content

diogo

Moderators
  • Posts

    4,314
  • Joined

  • Last visited

  • Days Won

    80

Everything posted by diogo

  1. It's in the _func.php file, which is included in _init.php, which is automatically prepended to all template files https://github.com/ryancramerdesign/ProcessWire/blob/master/site-default/templates/_func.php#L25
  2. Guys, finally the podcast episode where I talk about PW is out. It's spoken in Portuguese, so most of you won't understand a word, but still I wanted to shout it here http://10web.pt/programas/programa-15-diogo-oliveira-trabalho-remoto-e-internacional-processwire-e-webdesign/
  3. Not sure if I understand what you mean. You want to have the detailed content in a custom database, or...? I'm not suggesting that you duplicate the pages, or something like that. Those are the children pages "detailed view", and they contain all the content.
  4. Hi cssabc123, welcome to the forum! Very quickly and resumed because of time constraints: - Holder - article 1 - article 2 - ... //holder.php foreach ($page->children as $article) { echo "<h2>{$article->title}</h2>"; echo "<p>{$article->summary}</p>"; echo "<a href='{$article->url}'>Read more</a>"; } //article.php echo "<h2>{$article->title}</h2>"; echo "<p>{$article->body}</p>"; I left lots of things out,like pagination, that you can read about here https://processwire.com/blog/posts/processwire-2.6.18-updates-pagination-and-seo/ But hope you get an idea.
  5. Welcome to the forum Hanna, thanks for your insight. Hope to see you around here from now on
  6. $page->children is an array, you can't echo it directly: foreach($page->children as $child) { echo $child->title; }
  7. First base? Second base? Are you talking in code??
  8. I never tried Forward, but ngrok works great with login in the backend https://ngrok.com/
  9. I did it already, even if that's not the strategy, it just doesn't make sense to leave it there if it was not made in proseccwire processwire. Google is fast at getting links from the forum, all seconds are precious
  10. Sorry for the double not that nice posts. I didn't LostKobrakai's answer before I posted mine. Anyway, thanks for the suggestion
  11. We have already a Markdown, a Textile and even a BBcode textformatter https://github.com/ryancramerdesign/TextformatterBBCode , for HTML there is already CKeditor
  12. Oh, thanks LostKobrakai! Meanwhile I used a pretty decent solution to do the same (even better because it goes further in the tree). Here it is for those interested: $page->closest("info!=")->info
  13. Would be really nice to be able to do this when outputting a field: $page->get("field|parent.field") I was already looking in the coreto see how it could be done, but got lost In theory it shouldn't be too hard, since it works already with pages selectors... or?
  14. Did you consider - retirement - old age - work ?
  15. You're welcome Remove is in the cheatsheet, you have to toggle the advanced mode (button on top)
  16. Also, you can remove the current page from the array to avoid the IF check inside the loop $results = $pages->find("tags={$page->tags}")->remove($page)->shuffle(); Or, do the same as above with one less method: $results = $pages->find("id!={$page},tags={$page->tags}")->shuffle();
  17. Pw converts pageArrays to a string in that formal automatically when inside selectors, so this should do the same: $results = $pages->find("tags={$page->tags}")->shuffle();
  18. Here you are trying to get the address of many pages. Doesn't work. $page child gets the first page from the children, just like if you would do $page->children->first(), and being a single page, you can get it's fields without looping.
  19. For now try replacing the "HERE WE NEED THE DESCRIPTION" by <?=$pages->get("/site-settings/")->site_prettyphoto->description ?> Even if it works, there are still some things that need to be corrected in your html
  20. In that case, you just have to get the fish page and then get it's children $pages->get("/fish/")->children Or, if you're planning to use that page again later in the code: $fish = $pages->get("/fish/"); $fishChildren = $fish->children; foreach ($fishChildren as $item) { ... }
  21. The beginner profile template files (like the one I linked to) have very well commented examples of these kind of things, have a good look at them. You'll get the hang of it in no time, you'll see
  22. See this example and adapt it to the markup that you want https://github.com/ryancramerdesign/ProcessWire/blob/master/site-beginner/templates/_head.php#L51-L53
  23. Well, if you want to do literally that $page->parent->children but this is better $page->siblings or, to exclude the current page $page->siblings("id!=$page") or $page->siblings->remove($page)
  24. Hi jee, welcome to the forum. Check the settings tab of the homepage. It's all there.
  25. This one looks really interesting http://prosemirror.net/ From the author of codeMirror
×
×
  • Create New...