Jump to content

grigorisk

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by grigorisk

  1. It does not work for images in my site any suggestions?
  2. hi! i'm using Import Pages from CSV module to import data from csv file, but i see that this module does not support multilanguage fields. did you know any other way to do that? thanks!
  3. hi! i'm trying to get the label of my field that i use in two templates with different name. so i'm trying to get the label through the template. so my code is echo $templates->get("home")->fieldgroup->get("text")->label; but it gives me the general field label not that i'm using for the home template any idea?
  4. thanks @gebeer p.s. if anyone wants to do something like that you have to add the gebeer code (without function in my case) and just put this in find selector: $articles = $pages->find("date>=$first, date<$last, parent=[name=blog], sort=date");
  5. hi! i have a question about find page when i try to find a page with a value in an input field i take the right results but if i try to make the same with an input date field it not work as i want i have two variables so my search is like this: if($articlecat!="" && $searchdate!=""){ $articles = $pages->find("date%=$searchdate, articleCat%=$articlecat, parent=[name=blog]"); }elseif($articlecat=="" && $searchdate!="") { $articles = $pages->find("date%=$searchdate, parent=[name=blog]"); }elseif ($articlecat!="" && $searchdate==""){ $articles = $pages->find("articleCat%=$articlecat, parent=[name=blog]"); }else { $articles = $pages->find("parent=[name=blog]"); } this working great for tag field (articleCat) but it's not working for date field (date) the string in $date has this format: January-2016 and in my pages has this format: 12-January-2016 so i want to take all the pages that has January-2016 on their date field can you help me?
  6. thanks man!!! you save my day in office!!
  7. hi! i'm trying to create a child for my page in form submit via ajax but i have this error "Fatal error: Class 'Page' not found in /home/chaniataxi/public_html/site/templates/insertReservations.php on line 4" the code in insertReservations.php is $p = new Page(); // create new page object // <--line 4 $p->template = 'insertReservations'; // set template $p->parent = wire('pages')->get('/my-reservations/'); // set the parent $p->name = $name."-".$sname.'reservation'; // give it a name used in the url for the page $p->title = 'Νέα κράτηση στο όνομα'.$name." ".$sname; // set page title (not neccessary but recommended) // added by Ryan: save page in preparation for adding files (#1) $p->save(); same with soma's code i create a template for insertReservations.php with name insertReservations my processwire version is 2.6.1 did anyone know why i have that error?
  8. so there is no way to get only the last part of url (/el/ or /en/...). it's able to get the name of language but not the url?
  9. Hi! i have a question about page language url i have a site with 2 language, default and greek. so in my home i set empty the language field for my default language and el (/el/) for my second language. so if i want to navigate from my default lang page to other lang page i just put the /el/ after my domain. my problem is that i want to get the page language url (el/ , en/, de/...) but i can't find the right syntax of $user->language to get it i try $lang = $user->language->name; but i get the name of my lang, i try $lang = $user->language->id; but i get a number (the id of my lang), can anyone tell me if i can get the /el/ using the above syntax?
  10. i found a solution: $my_page=$pages->get("name=pricing"); // get pricing $childrens = $my_page->children; //get childrens foreach ($childrens as $children){ $tables = $children->children("fcheckbox=1"); // get the childrens with checked checkbox foreach ($tables as $locationTable){ . . . } }
  11. i try both but nothing... my page tree is (i can't upload image so i'll describe it...) pricing (my parent page) heraklion (1st child) heraklion pricelist1(1st child of heraklion) . . . Chania (2nd child) chania pricelist1(1st child of chania) chania pricelist2(2nd child of chania) . . . . . . and i want to get all the children of the pricing page (heraklion, heraklion pricelist, chania, chania pricelist,....) if their checkbox is checked
  12. Hi! I have many pages-childrens of my main page with name=rates and i want to get all the childrens of my rates page by their input field value. My input field is checkbox and i want to get the page if checkbox is checked. Any help?
  13. hi i want to post variables to a page via ajax to get result from my database depenting my post value so my ajax is: var clickval = clickelement.value; var dataval = "city=" + clickval; $.ajax({ type: 'POST', url: "*MY PAGE SMART URL*", // e.g. http://my_domain/my_page.... data: dataval, dataType: 'text', //or json, i try both complete: function(data, status){ alert(data.responseText); } }); and in php page: $getcity = $input->post->city; echo "value = ".$getcity; just to show my post value... and my alert is "value = ". $getcity is empty and $input has no value inside and it seems like post is never be done, but i have no error in my console... can anyone help me?
×
×
  • Create New...