-
Posts
4,296 -
Joined
-
Last visited
-
Days Won
79
Everything posted by diogo
-
$angebote = $pages->find("template=travelCat, id!=123|156|736, sort=sort");
-
Well, it's not that simple. You also have the files that ProcessWire creates like images, logs, sessions, etc. So you would have to make sure you keep those in sync also.
-
I'm a bit confused by the title of the thread... so, you don't want it hardcoded right? What you seem to be asking is very easy with the new multi-language fields http://processwire.com/api/multi-language-support/multi-language-fields/ This post from Phillip and subsequent answers might also be useful for you http://processwire.com/talk/topic/5518-multi-language-site/?p=53784
-
-
Adding pagination after merging two PageArrays?
diogo replied to landitus's topic in General Support
I tried with more than 5000 IDs and it worked (they were the same IDs repeated, but I don't think it makes a difference) Edit: With 8000 still works, but with short more than that it breaks Edit2: false alarm, it was a mistake in my code. With more than 25.000 IDs it takes long but still works. With much more than that it doesn't, but I'm guessing it's because of PHP time limit. Edit3: "Maximum execution time of 30 seconds exceeded" -
Adding pagination after merging two PageArrays?
diogo replied to landitus's topic in General Support
hm, not sure... is it? -
Adding pagination after merging two PageArrays?
diogo replied to landitus's topic in General Support
I like this solution: $events1 = $pages->find("template=event, date>=today"); $events2 = $pages->find("template=event, date<=today, date_end>=today"); $events = $pages->find("id=$events1|$events2, sort=date, limit=15"); // now you can paginate $events -
Hello and welcome! The line echo "<ul>$out</ul>"; should be outside the foreach. Like this: foreach($albums as $album){ $out .="<li><a href='{$album->url}'>{$album->title}</a></li>"; // <- not here } echo "<ul>$out</ul>"; // <- but here
-
how can i make multi tab in front page like in admin mode?
diogo replied to bram's topic in General Support
Bram, if you read a bit through the forum you'll see that this is all about writing code. If you don't want to use an oven to make bread, you will go to the bakery and buy it ready You can also buy an oven and learn how to use it of course. The pro backers at the forum will be there for you -
how can i make multi tab in front page like in admin mode?
diogo replied to bram's topic in General Support
Hi and welcome to PW bram, Q1. The tabs are achieved with jQuery UI https://jqueryui.com/tabs/, and they are a front end thing, not something particular to ProcessWire. All you have to do is follow the instructions there, and build the wanted markup with PW. Of course jQuery Ui is not your only choice for this http://www.jqueryrain.com/example/jquery-tabs/ Q2. Yes, with lots of work. And no, there are no modules for that. -
Having trouble combining sorting by date and paging
diogo replied to webweaver's topic in General Support
sorry to interrupt the talk about teflon guys If you want a set of pages it's generally better to use find() and try to do everything with one selector. It's actually a nice exercise to try to achieve complex sets of pages with only one selector edit: what I'm calling "one selector" above, is not actually one selector, but a group of selectors in one find(). -
Nice! Small point of confusion for me is that the nav elements with dropdowns still behave as links. I would deactivate the hover color and the pointer cursor on those. Edit: I have to say that I absolutely love your website
-
Having trouble combining sorting by date and paging
diogo replied to webweaver's topic in General Support
$articles = $pages->get(1133)->children("limit=4")->sort("-article_date"); The problem is that here you are doing it in this order: children("limit=4") -> get the 4 first children sort("-article_date") -> sort them When what you want to to is get all the children sort them limit them Even better would be to do it with one selector so you can do all that at the same time and at the DB level. Like this: $articles = $pages->find(parent=1133, sort=-article_date, limit=4); -
bbeer, I was in a hurry and didn't explain something. You don't have to use the IDs in this case. Same thing could be achived by: $parents = $page !== $page->get('/holidays/') ? $page : $page->children; and, in the selector; $reisen = $page->find("parent=$parents, sort=reise_abfahrt"); Just for reference
-
$p_id = $page->id !== (hollidays id) ? $page->id : $page->children; Written on the browser and not tested, but theoretically this should work. This is what it does: If we are not on the "hollidays", page parent is this same page, if we are on the "hollidays" page, parents will be all it's children ( $page->children will output something like this: 342|654|877|998 )
-
You can use PW's pagination modu... well, kongondo beat me at it I can only add that you can apply a infinite scrolling plugin to the pagination http://www.infinite-scroll.com/infinite-scroll-jquery-plugin/
-
This works great for me: http://processwire.com/api/include/ On that example Ryan creates a executable file, but you can as well create a PHP file anywhere you want on the server and do the same: <?php include("/path/to/processwire/index.php"); // Do anything you want with PW. Remember to use wire('pages') and all the likes instead of $pages After that you can run it in the terminal like this: php path/to/your/file.php Or for your cronjob: @hourly php path/to/your/file.php You can even put some echo's on the file for debugging purposes and see them in the terminal. That worked great for me with scripts tat created hundreds of pages in one go.
-
And there you have it, the easiest multilanguage website in the history of CMSs
-
- 17 replies
-
- preprocessors
- concatenation
-
(and 2 more)
Tagged with:
-
Gulp anyone?
- 17 replies
-
- preprocessors
- concatenation
-
(and 2 more)
Tagged with:
-
I think it's a nice design, Designers should show of their skills on their own websites I also notice some JS quirks though. The dark background not always works, and I would much prefer "click/animation" to the dragging. A detail that I would definitely change is the italic "manifesto". I get the feeling that that's an artificial Italic and not the one designed for the typeface (the strange diagonal dot gave me that clue)
-
Try also to replace the files from the module by new ones. Might be that one is corrupted
-
Two European choices would be https://www.cloudcontrol.com/ and http://fortrabbit.com/
-
Welcome to the PW world Klauss
- 191 replies
-
- bitnami
- installation
-
(and 2 more)
Tagged with: