-
Posts
4,314 -
Joined
-
Last visited
-
Days Won
80
Everything posted by diogo
-
I got a like already
-
foreach($pages->get("/video-container/")->children as $p) { echo $p->folgeTitel . "<br>"; echo $p->folgeYT . "<br>"; } edit: Well, now you have two answers... find the differences
-
To get content from a field of one children page that you know the name, do this; echo $page->get("parent=$page, name=name-of-page")->field; To get more fields do this: $myPage = $page->get("parent=$page, name=name-of-page")->field; echo $myPage->field1; echo $myPage->field2; To get the fields from all children do as Martijn pointed out. Basicly, you will be looping through all the children, and extract the fields from each one of them. An important thing to know is that get() get's one page and you can immediately retrieve the fields, while find() gets a group of pages and you only have access to their properties when you iterate them (with foreach() for instance.)
-
By the name, I woud say that this function belongs to a very nice framework called ProcessWire
-
Martijn, I actually prefer that to the helvetica/arial stack
-
Welcome to the forum Chris! body is a custom field and as any other field it only exists if you create it (well, it comes with the default install, but you can delete it or ignore it). That's why it's not in the documentation like the properties and methods of the $page object.
-
Another interesting option for background noise http://www.noisli.com/
-
Ben, in the same github page there is a select where "master" is selected. Select "dev" instead and download.
-
Finding and posting repeater fields from another template
diogo replied to melissa_boyle's topic in Getting Started
this will return an array of pages, so you would also have to also loop over it. But is that what you want? to get the repeater field of many pages? -
Finding and posting repeater fields from another template
diogo replied to melissa_boyle's topic in Getting Started
That article is about finding a specific entry from inside a repeater field. If you want to find simply the repeater field of a page, you just have to do it as with any other field: $page->name_of_repeater_field. The difference is that this field returns an array (just like images, or page fields), so you will have to loop through it. I don't understand exactly what you mean by finding the field by template. You want to find the repeater fields form all the pages that use the "stockist" template? Or you have only one page that uses that template? -
Should the markdown module support the github flavoured syntax as an option? (mainly new lines to br and code blocks) Seems to me that it would be a matter of adding one class to the module, based on this module for wordpress: https://github.com/evansolomon/wp-github-flavored-markdown-comments/blob/master/github-flavored-markdown-comments.php
-
Empty languages listing (but I fixed it)
diogo replied to etherald's topic in Multi-Language Support
Thanks for the info and welcome I can reproduce the problem by setting the "language" field to be the only one being displayed. Plus, when I unselected it and returned to not having any field selected (default state) even the HRs disappeared. I hope Ryan will look into this. -
This might sound a bit crazy, but I wonder if doing this is more efficient; if($pages->get("parent=$tour, name=$concert->name, fotos.count>0")->id)
-
Great news! Now it's possible to try thousands of FontShop fonts while developing a website http://webfonter.fontshop.com/ http://blog.fontshop.com/2013/12/04/introducing-fontshop-webfonter/
-
A nice small review in French http://comparatif-cms.fr/processwire-cms-pour-site-sur-mesure/ Merci Christophe
-
Just to complete Willy's answer http://processwire.com/api/modules/markup-pager-nav/
-
He did it again Thanks Ryan, I can see me using these a lot! There were many times when I wished that some of these methods would exist.
-
Good one, didn't think of $config->ajax edit: You might want to change it to if(!$config->ajax) throw new Wire404Exception(); // content as it simplifies a bit
-
An ajax request needs an URL by nature, so for doing this you will have to have them available via URL. You can however throw a 404 if they are not requested via a post. if(!$input->post->secret) throw new Wire404Exception(); for this, you would have to use a method that sends some post info to the server via JS.
-
Sorry pwired, I didn't get it that you wanted to replicate the demo website. As fmgujju said, but put the content of the css folder inside the /templates/styles/ and the content of the images folder inside /templates/styles/, then make the links to them dynamic, just like in the default home.php
-
That index.html file is just for reference, not to use in your website. Build your PW site as you would normally and use these examples when you need them. The css and images folders, you can either have them in the templates folder, or put their contents in the /styles/ and /styles/images/ (although you won't need those images for sure), or whatever you do usually.
-
voted and
-
Creating Single Page layout with sections as child page
diogo replied to processwirefan's topic in General Support
There you have it, geeber and titanium just answered to the missing points. Building on top of that, your homepage code wouldn't be too different from this: <?php // header code foreach ($page->children() as $child) $child->render(); // footer code Couldn't get much simpler than this, could it? edit: titanium's method is perfectly fine, but if you're using the dev version you can use the method that Ryan describes here http://processwire.com/talk/topic/3551-small-tip-for-pages-that-will-be-used-with-render/ -
Extract Content From Repeater to another page?
diogo replied to quickjeff's topic in General Support
And you have to change $page to the page you want. The example that I gave above would get the page by name, buy you can get it by ID also $pages->get(1654) besides other ways using the different selectors. The only info that I have from you about that page is the template. Assuming that that's the only page using that template, this should work for you: <?php foreach($pages->get("template=bands")->band_performance->find("limit=5") as $band_performances) { edit: get() returns the first page found that matches the selectors, while find() returns an array (pageArray) with all matches for the selectors. -
Extract Content From Repeater to another page?
diogo replied to quickjeff's topic in General Support
I don't want to alarm you, but suddenly you turned into Mr. Bean! Have a look in the mirror.