Mijo

Members
  • Content count

    21
  • Joined

  • Last visited

Community Reputation

5 Neutral

About Mijo

  • Rank
    Jr. Member

Profile Information

  • Gender
    Male

Recent Profile Visitors

913 profile views
  1. Thank you very much!
  2. Thanks for the reply but unfortunately it does not work, tags are not showing. With my code above I achieve that tags (selected tags for news item) showing on single news, for example test 1, test 2 but when I am on to news list I see all tags that I have created.
  3. Hello all, I'm trying to get all selected tags on my news list, so far when I go to specific news I see tags that I selected for that news, but when I'm on news list I see all tags that exists, not once that I selected. Tag field is page reference, I have selected Multiple pages (page array), input field type Amselect. My code so far looks like this: <?php $tags = $pages->get("/tag/")->find(); foreach($tags as $tag){ echo "<li><a href='{$tag->url}'>{$tag->title}</a></li>"; } ?> Can you help please with some advice how to get only selected tags on my news list?
  4. Ohh thank you, my mistake I did not have a body field, now everything works properly,
  5. Hello, I'm having a problem with search form on my website, it throw me an error "Error: Exception: Field does not exist: body (in C:\xampp\htdocs\testweb\wire\core\PageFinder.php line 993)" My search.php (template) is: <?php $q = $sanitizer->text($input->get->q); if($q) { $q = $sanitizer->selectorValue($q); $selector = "title|body~=$q, limit=50"; if($user->isLoggedin()) $selector .= ", has_parent!=2"; $matches = $pages->find($selector); if($matches->count) { echo "<h2>Found $matches->count page(s) matching your query:</h2>"; echo "<ul class='nav'>"; foreach($matches as $match) { echo "<li><a href='$match->url'>$match->title</a>"; echo "<div class='summary'>$match->summary</div></li>"; } echo "</ul>"; } else { echo "<h2>Sorry, no results were found.</h2>"; } } else { echo "<h2>Please enter a search term in the search box (upper right corner)</h2>"; } ?> My form is: <form class='search' action='<?php echo $pages->get('template=search')->url; ?>' method='get'> <label for='search' class='visually-hidden'>Search:</label> <input type='text' name='q' id='search' placeholder='Search' value='' /> <button type='submit' name='submit' class='visually-hidden'>Search</button> </form> This is example from Minimal Site Profile, but I can not make it work, can you please give me some advice,. thank you very much.
  6. Thank you works like charm.
  7. Hello, I'm trying to get all pages that are using specific tag, for example I have page that uses tag sport, and then when I go to that specific url : example.com/tag/sport I want to list all pages that using sport tag. I'm using page reference like on this topic (link), and so far a get list all tags with: foreach($page->tag as $item) { echo "<li><a href='$item->url'>$item->title</a></li>"; } How can I get list of all pages that are using specific tag? For example on tag template. Thank you all.
  8. Hello everyone, I have Bootstrap select on my website ( https://silviomoreto.github.io/bootstrap-select/examples/ ), im trying to make foreach loop that lists all my brands with url. i want to have possibility that user can search (select brand) and than they go to that specific url, my code is below, can anybody help me with this,? Thank you all. <select> <?php foreach ( $pages->find('template=single, sort=-created') as $single ):?> <option id="brand-filter" value="<?=$single->url?>" <?=$single->title?> </option> <? endforeach; ?> </select>
  9. Thanks That solved the problem.
  10. Hello everyone, I have a problem with displaying portfolio items on the homepage. I have a template (projects) and there I have list of portfolio item, everything works as expected, however when I try to display portfolio items on homepage there is a problem. My code looks like this: <?php foreach ( $pages->find("template=projects") as $projects ):?> <div class="swiper-slide width-auto xs-height-auto last-paragraph-no-margin"> <div class="height-100 display-table"> <div class="display-table-cell vertical-align-middle"> <div class="display-block position-relative"> <img src="<?= $projects->imagesmall->url; ?>" alt=""/> <p class="bottom-text width-100 text-extra-small text-white text-uppercase text-center"><?= $projects->description; ?> </p> </div> <div class="hover-title-box padding-55px-lr width-300px sm-width-100 sm-padding-20px-lr"> <div class="separator width-50px bg-black md-display-none xs-margin-lr-auto"></div> <h3><a class="text-white font-weight-500 alt-font text-white-hover" href="#"><?= $projects->name; ?></a></h3> </div> </div> </div> </div> <? endforeach; ?> Thank you.
  11. It's working now, all I have to do is restart server Thanks everyone
  12. Thank you for your answer. This option is ok, but it outputs number 1 on about-us template, like this 1+123456789 it should be +123456789, I don't know what is a problem. Thank you in advance.
  13. Hello everyone, I have a question, how to call a field from one template to other template? For example; I have a phone field on the homepage, I want to display this information on template about us? I call that field on homepage like this: <?php echo $page->phone; ?> I'll try to do that on template about-us, display same information from that field (phone), but nothing happened? Is there any easy way to do that, to show the same field in different templates? I hope it is clear what I want to do Thanks in advance
  14. Thank you very much for your answers @kongondo, you helped me a lot Also, an excellent solution for bootstrap navigation: https://processwire.com/talk/topic/5680-bootstrap-3-navigation-with-multiple-leveltier-fix/?p=55504 Again thanku you Processwire is awesome
  15. Hello, Yes @kongondo I mean that, for example my structure is: About us History Projects I'm trying to display a subpages (projects, history) in a drop-down menu Screenshot for backend