-
Posts
469 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Gideon So
-
Get random items from repeater field from specific pages
Gideon So replied to Tyssen's topic in API & Templates
Hi @Tyssen. for($i = 0; $i < 5; $i++): $randomPage = $pages->find("your selector here")->findRandom(1); foreach($randomPage->repeater_field->getRandom(3) as $item) : Output endforeach; endfor; Hope this helps. -
Hi @gregory, Can you tell me more about your template settings?? Are you using the pro module: repeater matrix?? https://processwire.com/store/pro-fields/repeater-matrix/ Gideon
-
Hi @gregory, Is "case_studies" is a repeater or repeater matrix field?? Gideon
-
Hi @gregory, What is the field type of "type"?? Please provide more info about your template and field settings. Gideon
-
Formatting page array items - first, second, or third items
Gideon So replied to hollyvalero's topic in General Support
Hi @hollyvalero, Maybe you can try $yourArray->eq() to get the item you want. Can't give long example. Please take a look on the doc here: https://processwire.com/api/ref/wire-array/eq/ Gideon -
Yes. You can try it out yourself. Gideon
-
Hi, The alternate user template approach @adrian mentioned is the way to go. Actually, it really depends on what you want to do. For me, I added fields to the user template and it is good enough for me. I put a page reference field in the user template and another field in some other template that need to store user id. Then connect the two page reference fields with the connect page fields module. It works great for me. Gideon
-
Hi @joer80, 1. Go the Setup --> Templates, click Filters. Then set "show system templates" to Yes. 2. Click "user" template 3. click Family tab 4. set "May this template has childern" to Yes. 5. set templates allowed for this template if necessary. But please think twice before you do this. It is not encouraged to add children to user page. It is better to create a separate page with page reference field that set to choose from user pages. Gideon
-
Enabled https for localhost, now I can't turn it off :(
Gideon So replied to OrganizedFellow's topic in Dev Talk
Hi, Try clear your browser cache. Gideon -
Hi @louisstephens, <link rel="icon" type="image/png" href="<?php echo $config->urls->templates?>favicon.png" /> There is no need to add a splash before favicon.png. Gideon
- 6 replies
-
- 3
-
- favicon
- file permissions
-
(and 2 more)
Tagged with:
-
How to host an existing processwire project ??
Gideon So replied to oflcad's topic in Getting Started
You can go to the support forum to ask for help. Gideon -
How to host an existing processwire project ??
Gideon So replied to oflcad's topic in Getting Started
Hi @oflcad, Welcome to the forum and the world of Processwire. Do you mean that you need to move the development site to a production server?? If so, there are several ways to do it. 1. Export the datebase and import it to the production server then upload the whole site to the production server. Please amend the site/config.php file as needed if database name, database username and password are different from your development server. You also need to amend the $config->httpHost in the config.php file to the production domain. 2. Use the miration module. and there is a blog post about it. Hope this helps. Gideon -
A quick thought: make a subdirectory within the old site and develop the new site there. Delete all the old stuff (remember to leave the new site directory). Then move everything in the new site directory to the main directory. Done. Gideon
-
Hi, 1. PHP notice is not error. Your code still valid. 2. Try change the line if displaying image to the following: <?php echo $member->images->first()->url; ?> Gideon
-
Having trouble sorting prices in a foreach loop
Gideon So replied to ZionBludd's topic in General Support
It is very hard to tell because I don't know your template settings and page structure. Gideon -
Having trouble sorting prices in a foreach loop
Gideon So replied to ZionBludd's topic in General Support
Hi @mattcohen, I see. But I think the title=$item_title selector may just return 1 page. This is the reason the found page is not sorted. Please provide more info, for exampe , your template settings, page structure and what you want to achieve. Gideon -
Having trouble sorting prices in a foreach loop
Gideon So replied to ZionBludd's topic in General Support
Hi @Matt Cohen Deleted Gideon -
Hi @benbyf, Put setlocale(LC_ALL, "fr_FR.UTF-8"); into ready.php. Gideon
-
Have to tried to read the source code of the page to see if the field values are properly propagated? Gideon
-
PW 3.0.12: Support for extended (UTF8) page names/URLs
Gideon So replied to ryan's topic in News & Announcements
Hi @adamspruijt @Torsten BaldesBaldes, Please add comment here https://github.com/processwire/processwire-issues/issues/724 And let see if we can raise some attention from @ryan Gideon -
Hi @ryan, Can you look into this issue again: https://github.com/processwire/processwire-issues/issues/724 The fix is good for single language environment but there is error show in the backend under multi-language settings: https://github.com/processwire/processwire-issues/issues/724#issuecomment-443126270 Gideon
-
Hi @MateThemes, Welcome to the forum. There is no build-in function as far as I know. But I think it is feasible with some custom code in the template. Gideon
-
One Pager HTML template migration to processwire: good practices
Gideon So replied to Michkael's topic in General Support
Give page table a look. I made a single page site with it. Gideon