Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by ptjedi

  1. I share the same need as Can and icietla: the hability to disable the main language of any given page in order to exclude it from listings and access. For the time being, it is only possible to disable for non-default languages.
  2. ptjedi


    This is big leap in terms of backoffice management. Can't wait for it to come out! Any predictions on when that will happen? Any alpha version released already? Great work!
  3. Got it! I overlooked that section of the documentation. Thank you, both!
  4. Does anyone know how to translate properly the words "Prev" and "Next" that are rendered with Processwire's paginator feature? Thanks!
  5. I just found out what was going on. Since I am using the module LanguageLocalizedURL, I must activate the pagination flag in the translation template (the plugin author calls it the 'gateway'). Also, using page->find din't work, but the method in the first post does! thank you!
  6. Thanks for the answer, Soma. I had already tried with find, but the results are the same. However, I do have some other page->find, but they relate to other things (like setting up some options in a filter-menu). I've just deleted them, but the problem persists.
  7. Another thing that may help: If I type in the template echo $input->pageNum; The result is always one. I don't know what to do. I am this close to create my own pagination based on input attributes, but I rather use PW built-in functions.
  8. Hi everyone, Sometime since I posted something here, but I can't seem to be able to surpass this problem on my own. I've read a bunch of topics that relate to this problem but nevertheless, I fail to fix this pagination display. Let me explain and hope someone help me out. This is my current structure: Home CatalogCatalog (subpage, same type)Product 1 Product 2 ... Product N The script is triggered in the first 'Catalog' in the tree above. The template of this script is similar to the default search.php, where the results are packed into the $out variable and dumped at the end. I don't believe this has anything to do with my problem. At the beginning I have: $query = "limit=3"; $products = $page->get("name=produtos")->children($query); $count = count($products); It returns the correct number of items, and displays the first 3. At the end, I have the pager rendering: echo $jogadores->renderPager(); And it displays the correct number of pages. However, clicking one of the links, the page refreshes with a new URL, but with the same three results. The URL looks like this example for page 3: /path/to/url/page3 I have turned the "Allow Page Numbers?" on the 'catalog' template, so it should work. Thanks in advance!
  9. That's what I am talking about, Soma Thank you! Will test it and will report back anytime soon. Thanks everyone!
  10. That's an idea I had as well. I was just checking if anyone had a more elegant solution to the problem. Thank you and that will come in handy, however my question resides more on the part of "theme/template switching" rather than mobile detection.
  11. I've checked that module (thanks diogo and jukooz) but like jukooz said, it seems I have to have a separate tree of pages for this website. Wouldn't it be simpler to have all my templates duplicated (head.inc to m-head.inc, for example) and then figure a way to match things? In other words, if I needed a theme switcher (and no extra domain) would that module seem fit for the job in your opinion?
  12. Hi all, I was thinking what's the best approach for a multi-themed website. The point of this is to build a website that has a simple website for mobile within a subdomain (m.domain.com, for example). How can this be achieved? I assume everything would be easy if there would be another "/site" folder. Is this it? If so, how can that be achieved? Many thanks in advance! Cheers
  13. Yes, Soma, I agree with you on that. I believe I have to place the language alias before. And about that, I have a question that is connected to this problem. When I want to link to a page, instead of typing the URL with the normal name, I would like to get the URL depending on the language I am at. Here's what I do, but I think this solution is not vert elegant... $homepage = $pages->get("/"); $children = $homepage->children->find("name=pagename"); $child = $children->first(); Then I use $child->url for the url's link. Is there a easier way?
  14. I now realized that part. Search.php treats things differently, so I would need to set the language before the output construction. However I am still unaware on how to achieve this since I tried to use the head.inc language related code lines, and nothing resulted from that. Here's what I have: $lang = $user->language; $langname = $lang->name == 'default' ? 'pt' : $lang->name; I make no sense of this because I don't think it is setting anything (just storing the current languag in variables for further use), but everything else works. How can that be? I am confused now...
  15. I have that set in the header, it should load properly. However, I may have another loophole when I build the search form: <form id='search_form' action='<?php echo $config->urls->root?>pesquisa/' method='get'> The 'pesquisa' is the name of the search page. I believe this should change in order to get the /pt/ or /en/ after it, right?
  16. Thanks for both answers. My content fields are all multilanguage and work perfectly with everything else. I implemented the changes Ryan pointed out and the error is gone. However, now the language resets always to the default one. I type the string, hit the button and the language changes back and displays results on that specific language. You can check it here: http://maran.pt/ Try searching in portuguese (default) for "armario" and then, in english for "locker".
  17. Sorry to dig this up, but I've followed these instructions, changing: $matches = $pages->find("title|body|sidebar*=$q, limit=50, id!=1"); to $matches = $pages->find("body.data{$user->language}*=$q, limit=50, id!=1"); and the following error shows up: Error Exception: Unknown column 'field_body.data1029' in 'field list' (in /home/v3maran/public_html/wire/core/Database.php line 118) Any clue why this is happening? I am using the built in multilanguage module. Thank you.
  18. Just solved it. Was rather simple: if($area_alias){ $area_page_string = "catalog_product_area=$area_page,";}else{$area_page_string="";} if($tipo_name){ $type_page_string = "catalog_product_type=$type_page,";}else{$type_page_string="";} $matches = $pages->find("parent=/catalogo/produtos/,".$area_page_string.$type_page_string." limit=50, id!=1"); Thanks!
  19. Thanks to Ryan as well. I have another question though. If I have an URL like this: pesquisa-de-catalogo/?area=HL&type=passboxes and if I want to specify ANY area and leave the restraint only to the type, this returns zero results: pesquisa-de-catalogo/?area=&type=passboxes What's the better way to achieve that feature?
  20. Diogo to the rescue. Once again It works and I now understand how it's done. My problem is that I wasn't sure how to call this in the find query. The answer is that I need to match page objects and not titles, for example. Muito obrigado!
  21. Greetings, I wonder if anyone can help me understand how to overcome this issue. I am building a simples catalog with 3 taxonomy: category (determined by hierarchical page), type and area (both are selected using PageArray dropdowns, meaning that the Options are "pages" which have attributes themselves. Now, I want to create a search-like template that picks up the URL arguments, but I don't know how to set this correctly. I picked up the search.php example, and added category restriction, but now I want to also restrict by 'area'. $matches = $pages->find("title|body|sidebar*=$q, parent=/catalogo/produtos/, arealimit=50, id!=1"); The area attribute has 4 items, all of them have title, description and a field called 'alias'. I would like to search by alias, and return all products that have that 'area' selected. The URL should look like this: domain.com/catalog-search/?q=carro&area=RH Now, I want to pickup the 'area alias' typed in the URL (which I already have), check to which 'area' this alias belongs, and use that area to filter my results. Since there can be multiple areas selected, how can that "search query" be built? Thank you very much for any help.
  22. Don't know it it's related so pardon me if I am deviating the subject from it's original path. My question is: how to quickly refresh all image versions that were generated with the size function?
  23. That is exactly what I needed Soma, many thanks. And thank you for the comments as well. As a newbie I find them precious.
  • Create New...