Jump to content

pwired

Members
  • Posts

    2,318
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by pwired

  1. Hi, A page that I am working on will have to look like the screenshot I made of it below. As you can see it has a lot of text parts all around a picture. All these text parts have to become multi-language. What is the best way of doing this ? Making fields for every text part ? That would be cumbersome. And how would I position all these text parts ? Position absolute ? I wish this was possible directly in CKEditor but so far I would not know how. Maybe setup a table in CKEditor and put all the text parts in table cells ?
  2. Ok thank you for stepping in on this and for your explanation. I guess I have to play around with both conditional logic and wireRenderFile in a template file to see the difference between them in dynamic use.
  3. Ok the goal has to be, to be able to maintain/edit output as much as possible in one place such as _main.php (or in _page.php as a better conventioning naming) and have layouts outside _main.php to be able to give some of your web site pages different looks. Yes, the wireRenderFile() enables a more dynamic approach compared with swapping out static other _main.php files. But could the same also not be done with conditional logic in a template file to select different include layout.inc files ?
  4. That is an interesting way in how to expand on the delayed output strategy but in principal I see no real difference when compared to swapping the _main.php solution that is already there in the backend: I mean in the end I only see more diversion but I see no real difference in principal between swapping out _main.php's or $Layout's
  5. missed the f and look what can happen re-edited that line.
  6. hhvm works with a language called hack which is similar to php, example: <?hh echo "Hi, I'm a Hack script!"; Will this ever work with Processwire ? Do you have an example how to install hhvm on a day to day host out there ?
  7. Thanks for making this. I have an openshift account for some time now but never had the time to figure out how to install processwire on openshift. It is not the usual hosting server and database way.
  8. Thanks everybody for your replies. I already saw the wire render pattern passing by somewhere in the past in the forum but didn't realize then it was what I was looking for now. I prefer not to use a module at this moment and will try clsource's wire render pattern (well documented) and Horst's solution which I found again here in the forum https://processwire.com/talk/topic/8767-regarding-delayed-output/ also mentioned by mr-fan in this thread. I think these approaches will make the delayed output strategy for me a complete workflow for almost any website and speed up time to get things done and maintained.
  9. Hi, The more I use the delayed output strategy the more I like it. Load site wide used variables in _init.php, do your for each things and logic in the template file and output with _main.php But besides that I am wondering what you guys are doing when another layout is needed for a page that needs something different. Let's say I have a picture slider that I only want to use on the home page. On the contact page I only want to use the navigation banner and a contact form. Now I can make an extra template file contact.php and an append file _contact.php. In the append file _contact.php I leave out the picture slider and instead add a contact form. I go to the backend file settings of contact.php and disable the automatic append of _main.php and select _contact.php instead. Or I can keep on using _main.php using an include for either the picture slider or a contact form. Put there some logic that looks on what page we are, and if we are on the contact page then include the contact form else include the picture slider. Is there a better way to approach this ?
  10. Did you try Unpublised instead of Hidden ? Or exclude it from the auto generated with your own children for each loop.
  11. What is shown in the link https://github.com/ryancramerdesign/ProcessWire/blob/dev/site-beginner/templates/_head.php#L28 is a for each loop that outputs all children and use the title as a visible word to click on. But this is not always wanted as in my case. I want some children (not all of them) as links in a sub navigation menu and I don't want to use the titles of them as the visible words to click on, but other relevant word combinations. I would not know how to change this for each loop in such a way that it outputs or filters out only the children that I wanted and the words that I wanted to click on. Hence the solution I came up with. Maybe hanna code could make it translate and look more compact.
  12. I am not using it now but found a complete Gulp course with 11 series done by LevelUpTuts on youtube
  13. Envato Tuts is a respectable place to write on so that's a good thing in the first place. 1. decoupled cms make your own frontend with no cms rules 2. powerful and flexible api 3. accessible for both beginners, designers and coders Of course, every post and tuto helps, but when I come to think about it, it won't accelerate things for Processwire. My thoughts are that what would accelerate Processwire is a marketing plan.
  14. This is the first time I had to do both a multi language navigation banner plus a sub navigation and somehow the sub navigation part got me tricked. You guys are good at this: echo "<li class='current'><a href='$child->url'>$child->title</a></li>"; that easy Since I am really into delayed output lately (prepend _init.php append _main.php) I also like the function navItem approach Thanks for your replies, I am back on track.
  15. Hi, I am working on a main navigation menu (start, faq, contact) and a sub navigation menu (para ipad, blackbox, mando a distancia) See screenshot above When I select a language in the top right corner all menu items appear in their language correctly. So far so good. Now, when I then click on a menu item, it has to open a page in the current language. When I use this for example it will not open the contact page in the current language but in the default language (english) and also all menu items revert back to the default language (english) <li id="contact"><a href="/contact/" title=""><?php echo $contact ?></a></li> After some puzzeling I came up with this and now it opens the contact page in the current language and the menu items no longer revert back to the default language. So far so good. echo "<li>" . "<a href=" . '"' . $pages->get('/contact/')->url . '"' . ">" . $contact . "</a>" . "</li>"; It works, but when I look at that line of code it looks a bit over the top so I am wondering if there isn't a better or compacter way of doing this.
  16. pwired

    Avatar for pwired

  17. Did you do the design also ? It looks really good man. I guess the design with all in it took most of the time.
  18. It makes cpu usage (A10-7300 3.2Ghz with 4cores on my laptop) go up from 7 to 32 % It looks nice though Erika is your partner in graphics design right ? Anyways happy last days 2015
  19. Since the days back then of the modx evo course change, many modx refugees here. So welcome to the club You can start off with tutorials or clips: https://processwire.com/docs/tutorials/ https://processwire.com/talk/forum/13-tutorials/ https://processwire.com/videos/ http://processwire.tv/ You can find also some modx/processwire threads in the forum like this one: https://processwire.com/talk/topic/3111-a-modx-refugee-questions-on-features-of-processwire/ When you start with Processwire you have to make your self familiar with the concept that it is "an API-first CMS" a so called decoupled or headless cms. Together with the processwire flexible api makes this a diamond in a pile of cms systems out there. There is no building websites "the cms way" but you build your frontend separately in any way you want. That means, for one example, that you can directly apply any level of html, css and php experience that you already have. Here's another quick walk through https://processwire.com/talk/topic/4173-grouped-forum-posts-links-articles-tutorials-code-snippets/ There are quite a few people here making money with websites using processwire as their tool of choice. https://processwire.com/talk/forum/9-showcase/ Making money with processwire would not be different from any other cms system as it depends on your marketing, contacts, planning, etc. but in any case, processwire is a time saver getting your things done faster.
  20. discover and use Vagrant Boxes: https://atlas.hashicorp.com/boxes/search
  21. wouldn't this code do the same ? <?php foreach($page->children as $child): <div class="my-class"> foreach($child->images as $image): echo "<img src='$image->url'/>"; endforeach; </div> endforeach; ?>
  22. Yes, lately I am following the Wire Render Pattern by @cclsource because for me it adds perfectly to the delayed output strategy and makes things very organized. (also in a workflow)
  23. No images have defined sizes. The width and height you specify should be the same as the source image not just 100%. Resize and optimize an image first in an image editor. Better not but if you have to then second resize in the backend or use css for resizing in the browser. I think you should try another test host for comparing the TTFB part. Common issues for a TTFB delay on shared hosting are it's reached shared capacity.
  24. So there are two bottlenecks, the Image part and the Request / Server treatment part
×
×
  • Create New...