Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. maybe store a json string in the description field?
  2. Just thinkin' Make an "image" template put text fields for metadata in it ( as much as needed ) and a image field, that allow only 1 image. Then make a "category" template with a field of type Page ( multiple ). Then make for each category a page with template "category" and select the pages "images" you wat to be categorized. edit: a page could be a page, but you can use it to store data to.
  3. I needed the "sitemap" script for a horse pedigree tree, the original is more complex. As every horse has a field of type Page for the father ( create if not exists ) and for the mother the same. But again, learned a little more today. B) Think when I have a simpler site structure I will try out your MarkupSimpleNavigation.
  4. Thanks Soma, you just disarmed an explosive head. [[ $output .= siteMap($child); ]] didn't even know that's posible.
  5. I'll keep this plug-in in my mind. Maybe some customer want to have pop-up's & stuff & I need him to set a class of .popup or something. Again a very useful module! from Soma !
  6. I'm trying to set a sitemap to a variable, but somehow it doesn't function. It's unexperienced me having "trouble" with PHP. function siteMap($page) { $output = "<ul>"; function sub($page, $output) { $output .= "<li><a href='{$page->url}'>{$page->title}</a>"; if($page->numChildren) { $output .= "<ul>"; foreach($page->children as $child) sub($child, $output); $output .= "</ul>"; } $output .= "</li>"; } sub($page, $output); $output .= "</ul>"; return $output; } $siteMap = siteMap($pages->get("/")); Who can help me out explaining why it isn't functioning. tnx
  7. Martijn Geerts

    RoR

    Gazley, you thought about http://livereload.com/ as alternative?
  8. So far I know some browsers wait for each script to load to continue to go to the next. I'm not sure that new browsers do the same. Can't give you more information about load order for scripts. There was a pretty good article on css-tricks on script loading.
  9. I guess the response time of the requests can pile up. But I never experienced a slow admin other that the internal Apache server (osx) hangs a little. That has nothing to do with PW or PHP at all I think ( the rarely "stalls" happen to static HTML files to. ) That said, I don't think it will hurt if [[ async="async" ]] is added to some of the script tags.
  10. Martijn Geerts

    RoR

    @ Pete.... lol A nice blockpost from: Liip.ch about why they stick to PHP.
  11. But lately I'm thinking more & more giving alignment in the "hard" source less priority. One trigger for that is that I rarely watch the hard souce ( only for stealing ) & working with the generated source. Sometimes developping & adding line-break & tabs etc in your source code make your code harder to read & the indentation of your source will stack up quickly. Indentation of individual code blocks is important but how the individual blocks look together I think is less important. Readability in my editor should be more important. ( proper indentation is time consuming ) How I handle indentation also depends on the project. For large blocks of HTML in php I love to use "<<<EOF"
  12. Nice one Pete, I just added it to a "hobby" project.
  13. Thinkso, but never tried.... maybe you should try. ( repeater is just a collection of fields which you can repeat )
  14. Lists, It's just a mindset. ( selects grouped checkboxes, radios etc ) are just groups of pages. For example: Make a template without file called: "checkboxes" and put children in it with a template "checkbox" with only the title field. Name of the title is being used for the select value. Now from every other template you can add a field page to it and select "checkboxes" as parent.
  15. Yep, This looks great ....
  16. Jumping is on every reload when collapsed on chrome 21 (numers rising with the day ). If the logic is on JS side inclusive the cookie, think it's not that hard to pick it up with PHP & write the "height" in your head.
  17. Nice one Soma. 2 points. - When header is collapsed & swith to other page, .menu-wrapper is "jumping". Maybe write the css height of .menu-wrapper with PHP in your head. - On smaller screens logo & tel# disappear.
  18. Think we need a "WC" language for the admin.
  19. Learned that KutMasta Kurt Willy C's (brother/nephew?) has great style to...
  20. Think you have a typo, your code is not valid HTML or PHP. {$child->url} This is valid, but be aware of the right quotes. <li><a <?= $class ?>href='<?= $child->url ?>'><?= $child->title ?></a></li> to be save use <?php echo instead of <?= ( php shorthand )
  21. you're quicker then me apeisa
  22. I use sass for bigger projects. I like to separate parts of the stylesheet to individual files as it is easier to maintain. Especially with media queries & stuff... scss: _mq-mobile.scss _mq-tablet.scss _mq-normal.scss _mq-huge.scss _default.scss _helpers.scss _icons.scss _normalize.scss _print.scss in style.scss: @media only screen and ( max-width : 479px) { body:before { content: 'mobile'; }; @import "mq-mobile"; } @media only screen and (min-width : 800px ) and ( max-width : 959px) { body:before { content: 'tablet'; }; @import "mq-tablet"; } For smaller projects, just plain old CSS. For the preprocessing I used codekit, love the xtra's you get for validating css & js etc. The reason I use sass is that the syntax looked great, then I decided to stick with it & not look anymore for Stylus or Less. In bigger projects, a time saver.
  23. Sorry ryan, have a festifall this weekend. So can't test it this weekend. After this weekend if needed will see if I have somewhere a working Windows install at home.
  24. This is great ryan! Will test it next week, this weekend no computer for me
  25. Found this via twitter: ProcessWire, my new favorite CMS in the whole wide world! OOps, sorry diogo
×
×
  • Create New...