-
Posts
4,296 -
Joined
-
Last visited
-
Days Won
79
Everything posted by diogo
-
For now try replacing the "HERE WE NEED THE DESCRIPTION" by <?=$pages->get("/site-settings/")->site_prettyphoto->description ?> Even if it works, there are still some things that need to be corrected in your html
-
In that case, you just have to get the fish page and then get it's children $pages->get("/fish/")->children Or, if you're planning to use that page again later in the code: $fish = $pages->get("/fish/"); $fishChildren = $fish->children; foreach ($fishChildren as $item) { ... }
-
The beginner profile template files (like the one I linked to) have very well commented examples of these kind of things, have a good look at them. You'll get the hang of it in no time, you'll see
-
See this example and adapt it to the markup that you want https://github.com/ryancramerdesign/ProcessWire/blob/master/site-beginner/templates/_head.php#L51-L53
-
Well, if you want to do literally that $page->parent->children but this is better $page->siblings or, to exclude the current page $page->siblings("id!=$page") or $page->siblings->remove($page)
-
Hi jee, welcome to the forum. Check the settings tab of the homepage. It's all there.
-
This one looks really interesting http://prosemirror.net/ From the author of codeMirror
-
-
Ok, you did more changes than only those two. I noticed that you changed from { to [[ and seems to me that you removed the ability to output all the images from the field. I also had trouble to output the images even after I changed the call to [[ and can't seem to figure out why. I guess I would need more time to test the module before merging and won't have much time during this week. Would you prefer to wait or release the module on your own? Any is fine for me
-
The guys at uberspace.de sent me this email after my pw install: Translated from German (not by me obviously) --- Everything seems to be working fine here. Are they being too cautious or would it make sense to consider changing it in the core?
-
Hi kixe, thanks for working on this and for asking. Would be much better to merge than to create a new module with similar goal. Can you please wait that I give a test first? I'm hoping I can do it a bit later today.
-
Not really, browsers and clipboard are a muddy area. I encountered too many problems to implement something that would be secondary to most people. Not planning to go forward with this.
-
How to use a variable from one template in another
diogo replied to Reid Bramblett's topic in Getting Started
Not much time here, but just to say that you can always link to a search page where you filter the results by get variables. for example: /places-search?place=london&cat=see&interests=history /places-search?place=london&subcat=monument&interest=ancient -
How to import table of data into ProcessWire
diogo replied to Tony Carnell's topic in General Support
Craig is saying that he adds a field for each created page that contains the original id in the old database. If something goes wrong, or you need to adjust something in the import, or you need some more info from the old database that you didn't import originally, or you simply need to check if the items were imported correctly, you can check that field against the ID in the old database. $p->legacy_id = $row['id']; -
How to use a variable from one template in another
diogo replied to Reid Bramblett's topic in Getting Started
Not sure if I would. Depending on how the site would be built I would probably use your solution and create the views for those. Probably with a listing of all the interests and a sublist of all the places in each interest, but then, maybe it makes more sense interests inside places and not the opposite. It really depends on the content. -
How to use a variable from one template in another
diogo replied to Reid Bramblett's topic in Getting Started
I'm suggesting that he doesn't link to them Edit: Oops, before I forgot to change $i->url to simply $url on my suggested code. Maybe now it's more clear. -
How to use a variable from one template in another
diogo replied to Reid Bramblett's topic in Getting Started
Ya, probably simpler solution, but I wanted to avoid having to create views for /interests and /interests/interest that can be navigated by the url -
How to use a variable from one template in another
diogo replied to Reid Bramblett's topic in Getting Started
@elabx, not possible. We are in one of the interests pages at this point. -- You have only two ways of passing info to the future page when pressing a url: the url itself or session. With session there is no way to create a permanent shareable page, so i would go for the url. you can do this with url segments or using a get in the url referring to the place. -- I would simulate with url segments that interests is at the same level of the tree as (do, see, etc) and link to there instead, leaving the interests pages without a template file. You could do it like this: <?php foreach ($page->interests as $i) { $place = $page->closest("template=place"); //or whatever works $url = $place->url . "/interest_" . $i->name echo "<li><a href='{$url}'>{$i->title}</a></li>"; } ?> On the template from the places pages you would have something like (rough draft): if ($input->urlSegment1) { if (!substr($input->urlSegment1,0,9) == "interest_" ) throw new Wire404Exception(); $reduced = str_replace("interest_", "", $input->urlSegment); $sanitized = $sanitizer->name($reduced); $int = $pages->get("name=$sanitized"); $pois = $pages->find("template=poi, interests=$int"); $content .= renderNav($pois); } Edit: And welcome to PW! Edit2: corrected typo -
You have to be logged in to read the errors.
-
You have to read the errors
-
You are getting the general field itself, not the field in that page. Try this instead: $other_page = $pages->get("selector_for_the_page"); $other_page->setOutputFormatting(false); $other_page->bestelnummer = $other_page->bestelnummer++; $other_page->save('bestelnummer'); To understand the second line check this: http://cheatsheet.processwire.com/page/built-in-methods-reference/page-setoutputformatting-true-false/
-
If you're already inserting the message with jQuery, maybe it's easier to solve it also with jQuery. Just make sure masonry is called after you insert the element. By after I mean Javascript's after, not just after in the code, see my example http://codepen.io/diogo-ed/pen/LVwRyB
-
Thanks guys! I had this on my to do list, but got berried in the deep. It's fixes now with Mike's code. Thanks!
-
$page->template returns the template object, wish is not equal to the string 'products'. Try this instead: if ($page->template->name == 'products')