-
Posts
2,769 -
Joined
-
Last visited
-
Days Won
31
Everything posted by Martijn Geerts
-
I would say a ProcessModule for the AJAX request. That module should extend Process and Make sure the config array contains 'permission' => 'page-edit'
-
Cropping for different devices shouldn't mean crop to smaller sizes by default. Say you have a photo with a group of people and one of that group is the subject. It wouldn't be weird to crop out only that person for smaller devices.
-
redirect template without a .php file to it's parent?
Martijn Geerts replied to John W.'s topic in General Support
.htaccess to the rescue? Redirect 301 /home/business-directory/business-categories/ http://www.yourdomain.ext/business-directory/ -
Think you're adding a hook not listening for one. $pages->addHookAfter or the before are listeners. Before or after shouldn't matter as they are both before the save.
-
I don't know what the context of this search query is, but if it is from a search box, you could consider to use a Google Custom Search Engine. When the search queries become 'to complex' I would go for that option. Google gives back the URL, together with other found data. You could use the URL to get back to your own 'ProcessWire' data and enrich the result as wished. When you are scared having to pay for the searches, you could always store the google results temporary with MarkupCache or WireCache.
-
In basics my opinion is very simple, when removing stylesheets & scripts, the leftover should be good structured and meaning full Markup. Not markup that is designed to make it look better. What you see a lot in the so called frameworks is a grid system based on rows and columns. In most use cases those row divs are purely there for visualising, and they div(ide) content where the content should not be divided. Classes are meaningless for Markup, what I mean by this is that a <p> stays <p> even when the <p> has a class. So my opinion: classes are perfectly valid for visuals without altering the meaning. Pseudo elements can really help to make your markup as meaningful as possible. With pseudo you can left out that break, clear a float, etc etc, without using markup. Some people point out that html should be re-useable, so classes can be a 'pain in the ass', but my opinion is different for this as I haven't had a single project where I re-used big blocks of HTML.
-
@Teppo attributes and pseudo-classes and classes have the same specificity, so the order of your styles make the difference.
-
Maybe you have an autoload module or an init file somewhere that puts the output formatting off.
-
That shouldn't be, I'll file a bug on GitHub for this. And thanks for correcting me
-
In the settings you can enable json config, then in your browser console type console.log(AdminCustomFiles) and a JSON object including the process name will show up.
-
Does PW support organizing Template files in sub Dirs ?
Martijn Geerts replied to EyeDentify's topic in General Support
For 'experimental templates' I often use Select File Fieldtype, when that field is attached to a template, pages using that template can select a file that will be used as template. See the field settings for the options. -
PW 3.0.18: Yet more images field upgrades!
Martijn Geerts replied to ryan's topic in News & Announcements
Awesome update! But one feature request: Optional disable crops with flexible widths & heights' and enable crop sizes from 'presets'.- 24 replies
-
- 12
-
How to output text input in a repeater field
Martijn Geerts replied to Davabo's topic in Getting Started
// You don't need to loop the select $options = "<option value='Select Colour' selected='selected' disabled>Select Colour</option>"; foreach($page->colour as $colour) { $value = $colour->colourtext; $options .= "<option value='" . $value . "'>" . $value . "</option>"; } echo "<select id='colour'>" . $options . "</select>"; ps, could have a bug or 2 typed in browser. -
01. Is the name of your field in the actually 'meta_title'? 02. ProcessPageEditTruncate.js should be in '/site/templates/AdminCustomFiles/'!
- 67 replies
-
- 2
-
- Inputfield
- UI
-
(and 2 more)
Tagged with:
-
@laban, sorry didn't spot your question earlier. But here's the answer. // DOM is ready $(function () { // field with the name attribute title $("[name='title']").truncate({ characters: 55, prefix: '', suffix: ' character(s)' }); // field with the name attribute an-other-field $("[name='an-other-field']").truncate({ characters: 160, prefix: '', suffix: ' character(s)' }); });
- 67 replies
-
- 3
-
- Inputfield
- UI
-
(and 2 more)
Tagged with:
-
Output pure JSON for ajax calls in process module
Martijn Geerts replied to gebeer's topic in Module/Plugin Development
We all do stupid things. Every time again... -
Output pure JSON for ajax calls in process module
Martijn Geerts replied to gebeer's topic in Module/Plugin Development
echo json_encode($out); return $this->halt(); -
New ProcessWire 3.x API Reference Documentation
Martijn Geerts replied to ryan's topic in News & Announcements
AWESOME! -
PW 3.0.15: New quick-tree, debug, view panels and more
Martijn Geerts replied to ryan's topic in News & Announcements
Love the new panel thingy! Especially the 'side effect' that you can use it as some sort mediaquery tester while dragging the pane . -
-
-
While developing I love to have it all in front of my nose. Can do that, on the other-hand it shouldn't be that hard to replace </body></html> with Tracies markup plus </body></html> I guess.
-
Hi Adrian, When tracy is injected to the page, it breaks the W3c validator. It's not a real big deal but never-the-less: Are you willing to make Tracy compatible with the W3c validator .
-
A other possibility for ProcessPageEdit would be to abuse the method addOptionsString. The default InputfieldSelect (the page one:-)) has a method 'addOptionsString' that methode takes a string as argument. To create options from there you could create a text like the text below (There must be at least 3 spaces before the options, 3 is recommended) A 1234=Alfa Romeo 1235=Aston Martin B 1236=BMW 1237=Bugatti Example in the spoiler.