Jump to content

zaib

Members
  • Posts

    25
  • Joined

  • Last visited

Recent Profile Visitors

1,267 profile views

zaib's Achievements

Jr. Member

Jr. Member (3/6)

1

Reputation

  1. I've a json file, and from json file I'm creating some dynamic pages, problem is how i can edit language field or how to add new filed through API I'm doing like this <?php $string = file_get_contents('incl/codes.json'); $json_a = json_decode($string, true); $arabic = $languages->get("Arabic"); $page->of(false); foreach($json_a as $code){ $p = new Page(); // create new page object $p->template = 'city_code'; // set template $p->parent = wire('pages')->get('/master_data/city_codes'); // set the parent $p->name = $code["CITY_CODE"]; // give it a name used in the url for the page $p->title = $code["CITY_CODE"]; // set page title (not neccessary but recommended) $p->title->setLanguageValue($arabic, $code["CITY_AR"]); $p->save(); } ?>
  2. @dragan how can i create 6k pages with AP, is there any processwire module ? can you help me in this. thank you.
  3. @Tom. yes more than 6000, basically i'm select option is holding all airport city code like 'LHR,DXB,LAX etc..'. for page references do i need to create 6000 pages?
  4. I'm trying to save a select field with single select option but after clicking on save button i got error page, data in select options is more than 6000
  5. Hi, is there any module which can perform relational drop down, for example I've one drop down which is containing all countries if i select "UAE" the next drop down value will be change on the basis of selected counties and second dropdown will show all cities belongs to "UAE" Thank you.
  6. @cstevensjr Yes same template, and there isn't any field have their own permissions, only seo tab fields are there (MarkSEO) Processwire version is 3.0.62 PHP version is 7.0.22-Obuntu0.17.04.1 MacOS Seirra 10.12.6
  7. In PW I created a user 'tester' and gave the access to create edit and new. Issue is I'm unable to see 'edit' link in front of each page link and pages that i want to edit is already created. any help in this will be great help. Thank you.
  8. I've a simple scenario, i want to add two users "content_creator" & "content_publisher" content_creator can add new pages,edit them(only edit not publish) and view only where content_publisher can publish the unpublished pages after reviewing. Thank you.
  9. I've two templates, one is category (multi select check boxes) and one is result based on the selected category when I'm rendering result page all result is showing in every category, its not filtered each result should be belongs to the referenced category <?php $getCities = $pages->find("template=t3Cities_list, tags={$page->tag_code}, sort=title"); $getResult = $pages->find("template=attractions, tags={$page->tag_code}, sort=random"); ?> <div class="container"> <?php foreach($getCities as $city){ echo "<div class='row'>"; echo $city->title ; echo "</div>"; foreach($getResult as $result){ echo $result->title ; } } ?> </div> result should be like this Birmingham Oxford Street Louvre and Tuileries Dubai Gold Souk Dubai Mall paris Mercado de Motores Nómada Market
  10. My web app is done, and ready for production, how can i take my all data to production what are the best practices. I was exporting my "Fields" and importing into my production website but it says "Request Entity Too Large The requested resource /processwire/setup/field/import/ does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit. Apache/2.4.18 (Ubuntu) Server at 52.18.55.209 Port 80" This is my server limitations or what i don't know, or suggest me how to do that.
  11. I'm fetching some results on the basis of categories check boxes (which are checked only). until here works fine, issue is if multiple check boxes are selected so given result is also duplicating <?php $getCities = $page->find("template=t3Cities_list"); foreach ($getCities as $city) { foreach ($city->tags as $get) { $getTags = $page->get("template=tags_template, include=hidden")->children("sort=title, tag_code={$get->title}"); echo "<div class='grid-masonry'><div class='grid-sizer'></div>"; foreach ($getTags as $tag) { echo "<div class='grid-item'> <a href='{$tag->url}' class='img-hovered'> <div class='overlay'> <span>{$tag->title}</span> <!--<div class='cat-subtitle'>{$tag->categorymeta}</div> --> </div> <img class='img-responsive' src='{$tag->categorythumb->url}{$tag->categorythumb}' /> </a> </div>"; } echo "</div>"; } } ?> $getTags = $page->get("template=tags_template, include=hidden")->children("sort=title, tag_code={$get->title}"); this {$get->title} is the value of checkbox
  12. I'm fetching results from a template which works fine but when i change the language (in my case changed language is ARABIC), its showing me nothing $getResult = $pages->find("template=t3Cities_list, tags={$page->title}"); where "tags" are checkboxes with multi selection, How i can match the values?
  13. i added this parameter, working now JSON_UNESCAPED_SLASHES file_put_contents('posts.json', json_encode($json, JSON_UNESCAPED_SLASHES));
×
×
  • Create New...