-
Posts
354 -
Joined
-
Last visited
Everything posted by Tyssen
-
The XML feed will contain all data related to property listings. Things like home page, about, contact, staff profiles etc will be handled in PW. There'll be 100-150 items in the feed.
-
I'm going to be building a real estate website soon and am exploring my options. The site will have some pages that will be native to PW, but all their property listing information will come from an XML feed from an external provider. What's the best way to approach this? I've come across http://modules.processwire.com/modules/rss-feed-loader/ but is it possible to do searching, categorisation and pagination using that? Or is there a better way to approach it?
-
Yeah just after something to back up all site data to an external source at this point. ?
-
Fair enough. Following the other thread now.
-
The original author of ScheduleCloudBackups has indicated that they are no longer maintaining the module. Is there anyone who would be able to take it over and update it to fix the 404 error mentioned in the linked issue thread? I'm willing to pay for the update so get in contact if anyone is able to help.
-
I'm getting the same thing. There's an issue on Github with the same problem from June 2015. So it seems this project is now dead. Is that the case? And if so, are there any other alternatives?
-
Save button extra options don't work on production server
Tyssen replied to Tyssen's topic in General Support
Actually, never mind. Before writing this post, I'd just upgraded to 3.0.47 and had tried again on production and it still didn't work, but have just tried again after refreshing and now it's OK. I was sure I did it before too though :? Oh well, all good now. -
Since upgrading from 3.0.32 to 3.0.41 and higher, the save buttons on entries don't work correctly on the production server (fine on the local development server running MAMP); the extra options are missing from the header button and clicking on the extra options from the button in the footer just returns you to the top of the page. Hitting just Save on either header or footer button saves the entry OK, so currently there's no ability to save & exit, save & view etc. Both local and production servers are running PHP 5.6. What other differences between servers might be causing this problem?
-
Is it possible to have different breakpoints for different image sets? Or some way to control the value for the sizes attribute? For instance, for hero images that are going to be full width of the page I'll want different sizes than if I'm displaying a small author headshot which just needs a 2x or 3x version for HiDPI devices.
-
I'm getting the same error.
-
Does MediaManager work in repeating fields and if not, is that on the roadmap?
-
Thanks, that'll do nicely.
-
The bits I left out are: <img src="'.$book->best_book->image_url.'" alt=""> <h3 itemprop="name"><a href="https://www.goodreads.com/book/isbn/'.$goodreads->isbn.'">' . $book->best_book->title .'</a></h3> <p class="bundle-book-author">by '. $book->best_book->author->name . '</p> where it says // content goes here I really just want to cache the XML output itself so that I can continue to work on the template markup and styles without having to wait several seconds for each page refresh. When you say generate a unique name for each cached portion, do you mean with a count and then something like ${'var' . $i}?
-
I'm working on a site that is using the Goodreads API but I'm finding the page very slow to render so would like to speed it up by cacheing the output of the API. The page is made up of several child page 'bundles' each of which displays a selection of books which are chosen with a repeating field containing ISBN numbers. $goodreads_api = 'xxxxxx'; foreach($page->children as $bundle) : foreach($bundle->goodreads as $goodreads) : $xml_string = file_get_contents('https://www.goodreads.com/search/index.xml?key='.$goodreads_api.'&q='.$goodreads->isbn); $book_xml = new SimpleXMLElement($xml_string); foreach ($book_xml->search->results->work as $book) : // content goes here endforeach; endforeach; endforeach; I've looked at the Markup Cache module but when I try cacheing the second foreach loop, I get the correct number of bundles and the correct number of books, but same output for every book. If I cache the first foreach, I get the correct number of bundles, but only one book and again, the same content for each bundle. So is Markup Cache the way to go, and if so, what am I doing wrong, or if not, what else should I be looking at?
-
Yep, that was it. Needed to add the page ID.
-
I'm working on a sporting website which has a template for outputting fixtures and scores. I've enabled frontend editing for the relevant field on the page by adding an edit attribute to HTML tags and it works fine when editing the individual entry. But I also have another page using a different template which compiles all the weekend's fixtures onto a single page for easy viewing. I'd like to be able to edit all the results from this single page rather than having to visit each page individually but when I do, I get: Is there a way around this?
-
I'm just trying this out for the first time and wondering how to do the following things in Twig. $modules->isInstalled("AdminLinksInFrontend") ? $modules->get("AdminLinksInFrontend")->render() : ""; <?php echo AIOM::CSS('../../assets/css/style.css'); ?> Also, when trying to do <script>{% include "../../assets/js/fonts.min.js" %}</script> I get Is there a place to configure directories? Or another way to allow directory traversal?
-
Thanks guys
-
I'm using this: $categories = $pages->get(1077)->children->shuffle(); foreach($categories->slice(0, 6) as $category) : include("./inc/category-items.inc"); endforeach; to randomise and display only 6 items of a certain page's children. Now I also need to exclude children which have a certain template from the output. I did have: if($category->template->name!='exclude') include("./inc/category-items.inc"); but that sometimes results in only 5 items being shown. What do I need to do to the $categories array before it gets sliced?
-
Great, thanks.
-
I've implemented a site search on a site and am a bit confused about how it processes results. For instance, a search for art union produces no results, same for a search for art, but a search for union produces 5 results including the one I was hoping would come up which has a title of art union. How/why is that happening and is there anything to configure to improve the results? My search form looks like: <form action="<?php echo $pages->get("template=search")->url; ?>" method="get"> <input type="text" name="q"> <button type="submit">Search</button> </form> and the search template: if($q = $sanitizer->selectorValue($input->get->q)) : $input->whitelist('q', $q); $matches = $pages->find("title|body|summary~=$q,template!=admin, limit=50"); $count = count($matches); if($count) : foreach($matches as $m) : … endforeach; endif; else: … endif;
-
Updating checkbox field based on values from repeater field
Tyssen replied to Tyssen's topic in API & Templates
Never mind, realised my problem about 30 seconds after posting. :/ Mods can close this thread. -
Updating checkbox field based on values from repeater field
Tyssen posted a topic in API & Templates
I'm using a repeater field for holding stock levels of different items and when all the rows' quantity columns equal 0, I want to set another stock checkbox field to off. I'm doing this in the template that displays the product: foreach($page->inventory as $stock) : $stock_total += $stock->qty; if($stock_total==0) : $page->of(false); $page->stock = false; $page->save(); endif; endforeach; but it's setting $page->stock to off whenever the page is refreshed regardless of whether $stock_total = 0 or not. Why is that? -
Actually what I needed is sort=parent,sort=sort but thanks for pointing me in the right direction. I didn't see any mention of anything like that in the docs or in searching the forum.
-
I have a series of products which are attached to 'collections' which are their parent pages. I need to be able to output the products by their parents order. At the moment I have this: $products = $pages->find("template=product,stock=1"); which worked fine when I first created the site because all the products were entered in the correct order, but now a new collection has been added that needs to go first. (Parent pages have a different template than the individual products.) I've tried adding sort=sort but as mentioned in the docs it doesn't really produce the desired result. So how would I go about it?