-
Posts
4,314 -
Joined
-
Last visited
-
Days Won
80
Everything posted by diogo
-
Trying to get the first object with a condition
diogo replied to tinacious's topic in General Support
So now he must be on netscape already...- 16 replies
-
- 1
-
-
- conditional
- foreach
-
(and 1 more)
Tagged with:
-
chrome dev here (giving it another thought, i can't really complain, right?)
-
Just don't create a template file for these pages template, and their urls will throw a 404
-
Hold onto it. You'll get there
-
You're welcome. Yep also happened to me the problem with the code after posting the first time, but it was corrected after editing and saving again... @Pete, sorry to bother you again with this, but the forum is acting a little crazy
-
Arjen, 0 % 3 = 0, you want to insert the <p> on the first image?
-
Welcome to the forums Marcus Your $number_of_images variable will always hold the same value (in this case 5), so the result of the module 3 test will always be false. What you have to do is forget about the images count (you don't really need it for this), and use a simple counter for the loop. With this change, your code would look like this: <?php //$number_of_images = count($pages->get(1012)->images); <- no need for this $i = 1; // <- the counter starts with 1 foreach($pages->get(1012)->images as $image) { $thumbnail = $image->size(118,112); echo "<a href='{$image->url}'><img class='photo' src='{$thumbnail->url}' alt='{$image->description}' /></a>"; if ($i % 3 == 0) { echo "<p>Insert</p>";} // <- the module test is made against the counter i++; // <- update the counter on each iteraction } ?> PS: use the code tag on the editor when writing code. It will look much nicer
-
Yep, not that intuitive. This should be better documented for sure. What's the language you translated to? I'm curious
-
Pf, I think I will start writing my posts in sublime text from now on...
-
-
For the faq you should consider to use a definition list instead of (ul, li) because it will give you more control for styling the questions and the answers, and it's semantically more correct (arguably, of course): <dl> <dt>question?</dt> <dd>answer</dd> <dt>question?</dt> <dd>answer</dd> </dl> edit: what happened to the first part of my post?? I had a paragraph linking to this http://bio.mq.edu.au/Tools/jquery/plugins/riklomas-quicksearch/examples/... or didn't I? hm, I'm confused
-
You could do the same thing in PW with repeater fields, but IMO the values that you have on these fields should be decided once in the design process and kept in the code. What's the point of sacrificing your website performance by having all this info in the database? @apeisa, same time
-
Just watched this, thanks Dave. It's a very interesting talk, and I would say PW fits on her idea of a good CMS (besides, maybe that the content is associated to URLs), but the fact that our content chunks are grouped in something called "pages" would definitely put her away in a first impression...
-
Amazing! Like Adam said on that other post "This is wonderful information and I believe it fits into FAQ section". So why isn't it?
- 7 replies
-
- multi-domain
- multisite
-
(and 3 more)
Tagged with:
-
i think this is the intended behaviour. i even think that this limit it imposed only by javasscript in the admin, but not sure.
-
this file is for setting multiple websites with a single wire folder. you point all the domains to the same ip, and create a "site-something" folder for each of them. then you just have to list the domains in that file and pair them with the correspondent folder.
- 7 replies
-
- 1
-
-
- multi-domain
- multisite
-
(and 3 more)
Tagged with:
-
half i wouldn't say, but if you count words instead of posts...
-
Welcome Bethanie! I'm on mobile and in a hurry to leave, but I'm sure that when I come back in the evening you will have already an entire course on ftp from the guys here in the forum
-
This will had complexity and force the table to have one more index, no? Personaly I'm happy with $pages->get(1919); // get "teams"
-
will read more carefully next time
-
Well, template files, css, and js are lost too unfortunately... you have the content but not the code. Maybe you can recover the raw html, the css and javascript if the site was cached by google. If so, you just have to rewrite the php with base on the html.
-
hm, this relationship starts with the wrong foot...
-
Not if he is using a framework, I guess... but if not, I'm totally with you: item{ float: left; } item:nth-child(3n+1){ clear: left; }