-
Posts
2,007 -
Joined
-
Last visited
-
Days Won
21
Everything posted by dragan
-
@yrglx check out the docs: https://processwire.com/docs/security/file-permissions/#securing-your-site-config.php-file
-
Images / Gallery sorting order based on language
dragan replied to sins7ven's topic in General Support
Just tag your images. https://processwire.com/blog/posts/processwire-updates-and-new-field-types/ -
page-field selector multiple parents | create new page
dragan replied to ngrmm's topic in Getting Started
I'm not sure I understand your setup. e.g. why don't you use a separate parent and template for tags? Do you have any settings in your parent templates that say "only pages with template x are allowed as children"? "extra template" = additional template? I guess the system is confused because you allow two templates for selecting, and is not sure where to create new pages. afaik there's no additional settings where you could define that. You'd probably have to create a hook for that. -
Just stumbled over this yesterday, when I wanted to do a simple date-difference calculation...
-
Manage PW Modules with Composer or similar
dragan replied to markus_blue_tomato's topic in General Support
Take a look at Wireshell. -
Page names have to be unique (if they share the same parent). If you create a new page with an already existing page-name, PW will append an integer. If you clone a page, it will add " (copy)" to the title, and also an auto-increment number to the page name. This happens both when you use the API or GUI. Maybe that's the problem here? You could check with slightly altering the selector for page name: name%= instead of name=
-
Nope, nothing like that. I never understood that nonsense with hardcoding full URLs into the DB. You might adjust a few lines in your site/config.php (allowed domains whitelist, disable debug-mode, change DB-credentials etc.), but that's about it.
-
No. In your Iron Maiden test gallery you load 4 JS files. You don't load them in your gallery you referred to in your first post. Check your template setup, your include/require setup etc. and make sure all frontend assets (css/js) are being loaded in your page(s).
-
When I inspect your page, no JS is being loaded at all. This doesn't have to do with PW per se. You're responsible for handling all the frontend assets correctly. (when I say "you", I mean the site-developer. The CMS just delivers what you tell it to.) Go back to the drawing board and make sure your HTML, CSS + JS setup is correct. Perhaps there's a missing include() or you've disabled a prepend or append .php file?
-
Template for API endpoint - Remove the language part in URL
dragan replied to Karl_T's topic in API & Templates
How is your API setup? Do you have this one single endpoint to retrieve everything? You could allow URL segments in your home (root) template (if you need just one, define only one and name it "api"). Then you would have to include some logic in your home.php template to handle the API requests. if($input->urlSegment1 == 'api') { // ... } else { // regular display of homepage } https://processwire.com/docs/front-end/how-to-use-url-segments/ -
https://stackoverflow.com/a/36373890
-
[SOLVED] How to export page URLs via phpMyAdmin?
dragan replied to Violet's topic in Getting Started
You could also get such a list with a few lines in the Tracy Debugger console, e.g. $pgs = $pages->find("template=project|basic-page|offer-index, parent!=2, include=all, sort=parent, sort=title"); foreach($pgs as $p) { echo "{$p->url}<br>"; } of course, adjust the selector as needed. If you need the full URL, just replace $p->url with $p->httpUrl -
Pixies live in Zurich, on their Doolittle tour: one of my all-time favorite gigs ever. God I'm old... ?
-
https://www.npmjs.com/package/benny-hill !!! ??
-
^ does this look normal to you? I see the same dev-template twice o_O Sure, but I have no idea how to find / generate JSON settings. Is that done from within Tracy? Or Tracy's module config @ module/edit?name=TracyDebugger&collapse_info=1 ? Template settings: I assume the JSON export from backend/setup/template/export/ ?
-
I have defined an alternative tpl in the tpl settings, and I then use the Template Path panel in Tracy, where it says: (the three orange cubes icon)
-
Custom look for page reference field select, radio or checkbox etc
dragan replied to sambadave's topic in General Support
I'm not sure, but maybe you could look at https://github.com/processwire/processwire/blob/master/wire/modules/Inputfield/InputfieldIcon/InputfieldIcon.module which is used in template settings under tab "advanced" and create something similar? -
[SOLVED] Add additional values when creating page via Page reference field
dragan replied to cehlo's topic in Getting Started
I'm not sure I understand. Do you mean to not only create a new page and the default title, but also populate other fields of the same template? What kind of data would that be? ^ can you rephrase that? If you just hit enter, it will create a new page; that's an in-built functionality. -
Nice module! Thanks for sharing.
- 11 replies
-
- 1
-
I'm getting such errors increasingly with Tracy: Filename doesn't exist: /home/foocom/www/dev.mysite/site/assets/cache/TracyDebugger/offer-index-dev.php on line: 135 in /home/foocom/www/dev.mysite/wire/core/TemplateFile.php I then have to manually copy over my dev tpl to the Tracy cache folder. Is this a bug?
-
What about Opera?
-
I don't have much to add to previous feedback posted already here, except that delivering a suitable (physical) image variation is good practise. It impacts page speed performance and also affects mobile SEO ranking: https://webmasters.googleblog.com/2018/01/using-page-speed-in-mobile-search.html Even in 2019, not everyone has ultra high-speed internet access everywhere and all the time.
-
Formatting page array items - first, second, or third items
dragan replied to hollyvalero's topic in General Support
You could use something like this: $refs = $pages->find("template=project, title%=Zürich, include=all, limit=3"); // limit here just for testing small result-sets $count = count($refs); $last = $count-1; $c = 0; echo "<p>$count</p>"; foreach($refs as $r) { switch (true) { case ($c === 0): echo "<hr><strong>FIRST: {$r->title}</strong><br>{$r->project_desc_short}"; break; case ($c === 1): echo "<hr><strong>SECOND: {$r->title}</strong><br>{$r->project_desc_short}"; break; case ($c === 2 && $c === $last): echo "<hr><strong>LAST: {$r->title}</strong><br>{$r->project_desc_short}"; break; case ($c === 2 && $c != $last): echo "<hr><strong>THIRD: {$r->title}</strong><br>{$r->project_desc_short}"; break; default: echo "<hr><strong>DEFAULT: {$r->title}</strong><br>{$r->project_desc_short}"; break; } $c++; } echo "<hr><br>" . $refs->count . " Referenzen gefunden"; see also https://www.phpknowhow.com/basics/if-else-and-switch-case/#highlighter_461554 Perhaps you could use this technique (PHP 7.2+), with goto: https://derickrethans.nl/php7.2-switch.html