-
Posts
2,321 -
Joined
-
Last visited
-
Days Won
44
Everything posted by tpr
-
Have you tried this? $packages = $pages->get('template=packages, currency='.$page->currency->id); Perhaps you can leave the last "->id" part too. If you are using this regularly, create a getPackages function in _func.php that accepts $page as parameter and returns the snippet I wrote above. Thus you could use getPackages($page) when you need it.
- 1 reply
-
- 2
-
Mentioned in today's weekly, thanks! (I'm glad I made some important changes a few days earlier )
-
This kind of stuff is generally solved by CSS media queries - show content on mobile, hide on larger screen sizes. Google for responsive design/layout/grid. @Beluga: it was close!
-
Ok, will try to squeeze out a PR
-
Updated to version 1.1.0 on GitHub: fixed wrong return if header rows were present fixed extra items when looping over a field moved TFMultiValue and TFMultiValueRow classes to separate files
-
Sure it helps, thanks! The module seemed surprisingly simple at first but now I can see the whole beast The thing I was trying to recommend is a checkbox that would toggle all checkboxes in the column, like this: This would require only some lines of JavaScript.
-
I'm just started to use BCE id a project and I like it, thanks! One question: do you plan to add a toggle checkboxes to columns, eg. mark all / unmark all? Sometimes I need to delete tens of pages at a time and this would speed up the process a lot. (for example 72 pages this time, this happens when my form processor goes wrong )
-
Just pushed a small update on GitHub: setting the wrapper element to a "span" instead of div.
-
MarkupSEO - The all-in-one SEO solution for ProcessWire.
tpr replied to Nico Knoll's topic in Modules/Plugins
Uncheck "Use parent's values if empty?" and a whole new world appears. -
Actually I have
-
Getting first image of an image field in ajax php file
tpr replied to Henrik's topic in General Support
Try $wire->pages->get('template=my_template')... instead. Your code is getting the field itself but without page context so it contains no data. -
MultiValue Textformatter for ProcessWire Set flexible data structures in "key = value1, value2, ..." format to use as variable groups in templates. Great for general site settings, social links, menus, etc. Converts contents of textarea field "social_links" from this: @ url ::: title ::: target Facebook = https://facebook.com/mycompany ::: Follow us on Facebook ::: _blank Linkedin = https://www.linkedin.com/mycompany ::: NULL ::: _blank Email = #contact ::: Contact to an object to be used like this: echo $page->social_links->facebook->title // result: "Follow us on Facebook" echo $page->social_links->email->title // result: "Contact" Putting it together: <ul> <?php foreach($page->social_links as $item) { ?> <li> <a href="<?php echo $item->url; ?>" target="<?php echo $item->target; ?>" title="<?php echo $item->title; ?>"> <?php // name is the original key echo $item->name; ?> </a> </li> <?php } ?> </ul> Syntax: @ header1 ::: header2 ::: header3 Key = value ::: value ::: value [ ::: ...] Another key = value ::: value [...] More info: Modules directory GitHub Feedbacks and suggestions are welcome.
-
Kinda hack but I would perhaps just include a js and append the links with jQuery each(). Provided if the full url is constructable on the admin page.
-
Regarding schema.io, how does it work with processwire? Do I need to upload items to schema.io and manage them there entirely, or within PW?
-
I'm building a textformatter module and I would like to restrict it only to Text and Textarea fieldtypes. I can do it within the module logic and works fine, but is there a way to restrict in a way that it won't show in the admin where it is not supposed to appear? For example, "hide" it on a PageTitle field Details tab? Or is it the developer's task to decide?
-
Nice writeup Sérgio, thanks! I like things like jade but I'm afraid I'll stick with traditional templating instead Currently I'm building a portfolio page (kind of). It's simple regarding the backend but somewhat more difficult on the frontend. It uses fullPage.js and other fancy things will be also incorporated. I used many tips here from the forums so thank you all who shared your tips! I realized I often need key=value kind of things, or key=value1,value2,valueXX thingies and put together a textformatter module that is ridiculously simple but very powerful. Of course I could set up separate fields or pages for them but that would require much more resources and wouldn't be so flexible. I still need to polish things up but so far so good.
-
Using translatable strings across template files
tpr replied to Webrocker's topic in Multi-Language Support
I guess you simply forgot the context: <?php echo _t('Soziale Netzwerke', 'Footer');?> If you set no context, the default will be used ('Generic' in your example). So if you wouldn't like to write the context in your php files, you should add strings to the Generic context in your _strings.php: // _strings.php: _x('Soziale Netzwerke', 'Generic'); // then you can omit context in templates: <?php echo _t('Soziale Netzwerke');?> Read more on context here: https://processwire.com/api/multi-language-support/code-i18n/#context -
Good read. I was 99% doing the same thing migrating a Drupal 6 site to... Drupal 7. I wish I knew PW back then...
-
Is any cache used?
-
So true! WillyC bein the only exception
-
Thet meid my dey!
-
Creating new responsive theme based on Foundation
tpr replied to formmailer's topic in Themes and Profiles
What I usually use is Base. It's basically a grid and some useful helpers, nothing special. For elements styling I prefer to start from scratch. Believe me, Foundation or Bootstrap (and alikes) only makes you lazier- 10 replies
-
- getting started
- responsive
-
(and 2 more)
Tagged with:
-
I make product visualization 3Ds regularly and such insights make me feel I'm totally newbie
-
Home page on live test server 404 after moving from local host
tpr replied to CodeCoffeeCode's topic in General Support
Try changing file permissions (recursively), I often have to do this due to our server.- 4 replies
-
- 1
-
- error404
- error after moving site
-
(and 1 more)
Tagged with: