Jump to content

SiNNuT

PW-Moderators
  • Posts

    1,011
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by SiNNuT

  1. maybe $config->paths->root ?? Path to your site root directory in ProcessWire.
  2. Because of my limited PHP skills i'm struggling a bit to generate a simple main navigation. The tree is like this: Home -Menu -Over -Route -Nieuws But the navigation needs to have the homepage in the middle. The markup is like this: <ul class="grid"> <li class='grid-item one_fifth'><a href='/menu/'>Menu</a></li> <li class='grid-item one_fifth'><a href='/over/'>Over</a></li> <li class='grid-item one_fifth'><a class='logo' href='/'><img src='/site/templates/wbg/css/img/logo.png'></a></li> <li class='grid-item one_fifth'><a href='/route/'>Route</a></li> <li class='grid-item one_fifth'><a href='/nieuws/'>Nieuws</a></li> </ul> On the screen: It will probably always be logo center and two navigation items on each side but i would like to get a 'active' class on the a elements. I wouldn't even mind hard coding some stuff but ideally the menu would dynamically reflect the page tree order for the four children, while still keeping the home link centered. I've been trying to do some modifications on the default menu in head.inc but so far no luck. Any help appreciated.
  3. If we're talking apps i would also like to mention prepros, it does a lot http://alphapixels.com/prepros/ If we're talking apps i would also like to mention prepros, it does a lot http://alphapixels.com/prepros/
  4. I'm not entirely sure about your exact scenario, but you could also add a fieldsettab, called 'site settings' or something, to the homepage template.
  5. Sometimes, but for me it's neccessary to build on top of un up to date framework. Because i don't do a lot of sites i don't have the time nor knowledge to come up with my own css. (That beeing said, stuff like Bootstrap seems like overkill i a lot of cases)
  6. http://processwire.com/talk/topic/3740-yahoo-css-library-httppurecssio/ All joking aside, this is a pretty neat resource and the soon to be released version has a more robust grid implementation. They do say so on the site, but keep in mind aforementioned file sizes are gzipped. Uncompressed it's more like 19 or 20 KB (still small though). Another one i'm trying out atm is http://cardinalcss.com/
  7. Have been vacationing in the Algarve region twice and i must agree, Super Bock blows Dutch lager out of the water. Then again, maybe the beers just taste better on a vacation, no matter what brand you have
  8. No need for double redirects i think, just define it in your site/config.php: $config->http404PageID = 27; This line is from wire/config.php. Setting it in site/config.php should override. Just replace '27' with the id of any page you desire. Untested and maybe i'm overlooking an obvious drawback but this should work.
  9. Peter, There's certainly nothing wrong with it but why do you use this form for internet forum postings? Seems a bit redundant and overly polite to be honest.
  10. Have not got time to debug atm but is also can't successfully install the latest dev. Seems that recent modifications to install.php breaks some stuff; installation hangs on database work, nothing written to db.
  11. Strange. Somehow, somewhere htmlentities conversion seems to take place. If there are no textformatters applied i haven't got a clue where that could be. Is the csv data itself correct? Have you checked what's in the database table for the field in question?
  12. You probably have the HTML Entity Encoder text formatter turned on for the field in question. You will find this setting on the details tab of the field. Disable this to allow html to render.
  13. Prepros (available for Win and OSX) Prepros is a GUI compiler for preprocessing languages such as LESS, Sass, Compass, Stylus, Jade, Slim, Markdown, Haml and CoffeeScript. Prepros can also live refresh your browser whenever you change your code on your favourite editor. Compile less, sass, scss, compass, coffeescript, stylus, jade, slim, markdown, haml and livescript files No dependencies (sass compass etc..) Image optimization Live browser refresh Javascript minification and concatenation @imports detection and watching Options for customization Error & success notifications Built-in http server
  14. Just recently came across this neat jQuery sorting and filtering plugin. I haven't used it myself but it seems easy enough to implement. Thought i'd share. http://mixitup.io/ one of the demos: http://mixitup.io/demos/parks
  15. gotta start using the reply fast/edit later tactics....
  16. http://processwire.com/talk/topic/1920-processwire-logos-download/
  17. The creation process really isn't a problem with the tools Ryan mentioned. Especially for stuff like country lists i think it's really powerful to use pages. Easy to maintain; if a country name changes (yes, this does happen every once in a while) you just update that page and everything using it will always be in sync, be it your select options or other places you used the country pages. Maybe you would want to add some additional info, like a country flag or multilingual country names. This stuff all becomes easy and transparent if you use pages. What if later on you would also want to support regions and/or continents? Easy to implement when everything is pages.
  18. To be consistent it's probably best to use PW's own sanitizer for pageName: $sanitizer->pageName($value, true) See the cheatsheet http://cheatsheet.processwire.com/#sanitizer and/or look at the source if you want to check out what it does exactly https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/core/Sanitizer.php
  19. Very strange....i'm at a loss.
  20. What does not work with your first line of code? I'm on Windows 7 as well and everything works as expected: template: <?php echo "{$page->title}<br />\n"; ?><?php echo "{$page->title}<br />\n"; ?> <?php echo "{$page->title}\n<br />"; ?><?php echo "{$page->title}\n<br />"; ?> output in 'view source', in IE, FF and Chrome, all the same: title<br /> title<br /> title <br />title <br />
  21. In my opinion CSS3 selectors (nth-child) are really the way to go for this kind of presentational stuff. Browser support is widespread ( http://caniuse.com/#search=nth ), but if you still care about <IE9 you're out of luck unless you use something like http://selectivizr.com/ or go with pure jQuery as Soma showed.
  22. Awesome post on textformatter modules teppo! Was gonna leave a comment on your blog but somehow it doesn't work. Tried a couple of times and no luck; after submitting the form just goes blank, no errors or others forms of feedback. "Good, useful content and nicely written! I also like that, next to PW specific stuff, you also provide some general (php) programming info and links."
  23. Without knowing the blitz test it's hard to tell what those results actually mean. But if the main part of the dynamics is that ads (pages) are being added very regularly i would think template caching or even more performant, ProCache would be very good options and probably very easy to implement.
  24. I would think you've got all the 'native' PW options down. If it's a 'little' project i would first see how things perform without any caching. Also remember the usual stuff for pagespeed optimizations, this can greatly impact the feeling you get when visiting a site. If you do want/need caching it's hard to say which one from your ts; this depends on the structure of the project and exactly what kind of dynamic stuff there is. For template caching there are also a couple of different cache expiration options; which may or may nor work for you in this particular project. Performance-wise i think it would be: ProCache > template cache > MarkupCache. Teppo's got a nice article on PW caching on his blog: http://www.flamingruby.com/blog/processwire-caching-explained/ Of course there's lot's more you can do (memcached, varnish etc.) but this is not directly related to PW, and probably overkill.
  25. $pages->addHookAfter('Page::path', null, 'hookPagePath'); function hookPagePath(HookEvent $e) { $page = $e->object; if($page->template == 'article') $e->return = "/blog/$page->name/"; } http://processwire.com/talk/topic/1799-routes-and-rewriting-urls/
×
×
  • Create New...