Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. PHP should work in .js file (url: <?php....?>...but if it is a PHP file that's outside the PW system, most likely you will get a 403 since PW doesn't allow direct access to some folders using your own PHP files.. (if that makes sense ) It's been a long day! See below...
  2. Sorry it didn't work out for you. Maybe, take a break from it. If you decide to come back to it, start by reading up on the docs, take small steps, complete the simple site tutorial....ease into it...
  3. You can fork it in Git to your computer (very easy if you are on windows) - or just download it and install normally..
  4. Then, maybe do as I have suggested. Install it as per instructions, then edit it in small chunks and testing as you go along. Btw, ideally, I think, you should try to develop your sites locally (WAMP, XAMPP, etc..)
  5. There you go. Is it the whole functionality of the Skyscrapers profile that you are interested in or is it the theme itself (html and css)? If the former, then install the profile as per the instructions then edit it in small chunks, testing along the way that you haven't broken anything. If the latter, then you can grab that from the "view source" in your web browser or by grabbing what you want from the template files..
  6. What about error.txt; what does it report?
  7. Turn debug on (in dev site only) or check in /site/assets/logs/errors.txt. What messages do you get? Have you checked your paths are correct? In Firebug or other web console, what errors do you see? Did you follow all the instructions listed here? I couldn't see anything in your link above; I mean, I don't know what am supposed to be looking at. Link to site maybe?
  8. I think I have read somewhere in the forums people say if it is fixed and won't change, why waste PHP resources? Stick it in the template file . Up to you ultimately...
  9. Peter, Have you had a look at /wire/templates-admin/default.php ? That's where the magic happens, I believe. Copy the contents of that folder to /site/templates-admin/ so that PW will serve /site/templates-admin/default.php instead. I'm not sure about your requirements but you can pretty much redirect non-admins to other places by editing default.php, I think. I could be wrong. I'm not sure if there will be effects on the rest of the system though. Have a look at this admin theme switcher that I was tinkering with. Basically, I edited /site/templates-admin/default.php to redirect to an admin theme depending on the value of a Page Reference Field. Edit: Have a look at this as well: http://processwire.com/talk/topic/3617-managing-users-and-related-pages/
  10. Definitely dev branch . (Diogo's optimization). Have a nice day too!
  11. Is that a dev site by the way? The slider image sizes are massive (parliament-1.png is 4MB; cliff-1.png is 5.8MB!) and are taking time to load. Just wondering...Beautiful site btw
  12. Out of curiosity, try this instead <?php echo "<img src='{$slide->image->url}'/>";?> But your code above should also work actually Edited code above to add {}
  13. @Horst: I thought he was using a PHP file outside the PW system (i.e., I didn't know it was a template file). @Svitcov: What is $slide? How does your other code look like just before what you have shown us above?
  14. Welcome to the forums Svitcov! Looks like you are trying to directly access the assets folder using a PHP file that is not a template file? If that is the case, PW will block you from directly accessing that and other folders, e.g. /site/templates/ using your own PHP files.
  15. Even these: $next = $siblings->getNext($page); $prev = $siblings->getPrev($page); are verbose I think? PW already has $page->next(); and $page->prev(); Can't those be used in this case? See these (answer for you in first link): http://processwire.com/talk/topic/3133-detect-first-and-last-sibling-page/ http://processwire.com/talk/topic/3714-how-to-do-this/ http://processwire.com/api/types/nullpage/
  16. @Ryan, You might want to have a look at zyON's other post. There is a question about formatting the URL...
  17. if ($page->id==1) {echo "you are on the home page"};// if the ID of this page is 1, then it is the homepage OR if(!$page->parent->id) echo "You are on the homepage";//Means, if this page has no parent, then it must be the homepage Actually, there is a lot of useful information in the documentation: http://processwire.com/api/variables/page/. It's worth having a look at
  18. Three times I started to post my comments after the review but gave up. If you can describe PW API as only "decent" then you clearly haven't used the system! Anyway, could be a matter of language. Wanted also to comment on the issue of pages which we know is an abstract term. Also, wanted to say you can save other stuff in db if you don't care about urls. In addition, there are PW projects that have >100k pages! It's not just for small projects. Was tickled by "updating PW requires tinkering with the system" . Anyway, I'm now preaching to the choir . You are right though; the exposure's good. There have been many re-tweets about the post.
  19. I'm afraid I can't help with the URL bit Am sure s'one will chime in pretty soon.
  20. Yeah. We can start by raiding Soma's Gist
  21. Assuming 1 product => 1 brand Brands Armani (child pages of brands) Canali Magee Lambretta Men Suit 1 (child page of Men) Suit 2 Suit 3 Suit pages will have a single Page Reference Field referencing their brand, e.g. Suit 1 => Armani Suit 2 => Lambretta, etc. Is this what you want? I'm not sure I got you correctly. You then want to search and display, e.g. all men's suits by, e.g. Armani? Not tested but I think either of these should work $pages->find("template=suittemplate, parent=123, brand=armani");// brand is the Page Reference Field; 123 = ID of men page // OR $pages->find(123)->children("brand=armani");//123 = ID of men page Edit; Selector above, is of course wrong, brand=armani...will not give you what you want. You will want to create a variable that can reference armani (title of the value of the brand page reference field.)
  22. Just to clarify, do you mean you want brand and collection to also appear in the URL or you are wondering how to use them in your selectors? If the latter, then you can use Page Reference Fields. Depending on your setup, these can be single Page Reference Fields or Multiple. For instance, I assume a product can only belong to one brand? Can a product belong to multiple collections?
  23. zyON, Welcome to PW! Please write down your site pages hierarchy here. E.g: Home Products Stuff Other stuff Even more stuff Etc. It is easier to see their relationships that way. I have tried to look at the other tried and am not sure what you finally selected. We can then take it from there
  24. Galaxy, What don't you get? Do you want to output a single image? Random images? Is it working for you now?
×
×
  • Create New...