-
Posts
2,769 -
Joined
-
Last visited
-
Days Won
31
Everything posted by Martijn Geerts
-
Why is there no $page->isPublished() method?
Martijn Geerts replied to bfncs's topic in API & Templates
I have printed the cheatsheet on large paper & sticked to the wall . tnx Soma (I wish I could create a large PDF from it & let it print very large) -
Lot's of Martijns over here in Holland. People call me Tinus therefore. (ps: I like your writing&positive style here on the forum)
-
By path: $singlePage = $pages->get("/blocks/footer/");
-
don't know for sure. I use a simular: <?php if($user->id==40) { include("construction.inc"); die(); } ?>
-
maybe: $options = array( 'has_children_class' => '', 'levels' => false, 'max_levels' => 2, 'show_root' => true, 'outer_tpl' => '<select id="select_mobile">||</select>', 'inner_tpl' => '<optgroup label="¬">||</optgroup>', 'list_tpl' => '||', 'item_tpl' => '<option value="{url}">{title}</option>', 'item_current_tpl' => '<option value="{url}" selected="selected">{title}</option>' );
-
Alway good to see code Adamkiss .
-
Yep indeed, thats the way to go for now I think. lots of hires solutions have double image requests & an extra js request. Or have to wait before DOM is finished to show the image. I think serving a bigger image is quicker than the extra requests. And as Ryan mentioned will become more normal in the near future. off-topic: Loudly thinking here about images in textaera/text. An imageFormatter a little bit like the the video embed module. In he settings: max-width % (landscape images) max-width % (portrait images) pixel density default position ( setting default position to left, right or none ) link to larger checkbox to set default or not for use in textarea/text, tags like: {imagesfield} ( first image of images field ) {imagesfield:n} ( where n is the index of the image in the images field ) {nameoftheimage:right} ( the image with that name aligned right ) {imagesfield:3:left} ( 3th image aligned left ) maybe: {imagesfield:3:right:%50} ( 3th image aligned right, 50% wide ) maybe: {imagesfield:3:link} ( 3th image link to larger version )
-
a basic approach I like: files: global.inc ( here you could place your "global" function & variables ) template-file.php ( include the global.inc on top & default.inc on the bottom ) default.inc ( contains the site HTML & placeholder $variables like $meta_description, $headline, $content ) So in global.inc you could place your switcher function. I use the global.inc for: putting scripts & styles everywhere needed in the config styles & scripts array. setting default values creating empty Variables like: $content = ''; ( that way I know I can start in the template with $content .= 'some string data'; ) Some functions reusable functions. template-file.php: <?php include (./includes/global.inc); $headline .= "<h1>$page->get('headline|title')</h1>"; $content .= $page->body; etc. include (./includes/default.inc); default.inc: Almost static HTML file with the $headline, $content etc. variables
-
me (sometimes)
-
When installing 2.2.10 installer said: 2.3 (this evening) a little notice on the the first installer pages: ( ! ) Notice: Undefined variable: config in /Users/martijn/Sites/www_domains/test/htdocs/wire/templates-admin/install-head.inc on line 26 But so far no other issues.
-
Sorry to spam again for tinyMCE. There's 1 thing missing right now I think. Thats a "retina" checkbox. Checking that checkbox would double the pixel size for images inserted via the image insert function.
-
Congratulations with the new design. It's fresh & looks great on mobile to. 1 Thing what I think it's quite annoying is that clicking the video links, the video takes direct control over the page. I rather see the video apears on the right the same way as when you hit: http://processwire.com/videos/.
-
Thank you Nik, the way of explaining things shows us a route to to handle error & stuff. It's very much appreciated . @adamkiss, ask WillyC if he likes the "Yoda sound".
-
IF you set them to hidden you could do: <h1><?php echo $page->title; ?></h1> <p><?php echo $page->introduction; ?></p> <?php $children = $page->children('include=all'); if(count($children)) { foreach($children as $item) { if ($item->isHidden()) { echo "I'm not displayed."; } else { echo $item->render(); // output template associated with item page } } } ?> <br style='clear: both;' /> (ps, written in browser not tested)
-
Great ! Thank you Nico.
-
A user just a (special) page. You could do add child pages, or images xtra fields, what you wish. Beware that that you can't move or delete a user page as you would delete a page.
-
maybe something like this: $yourUrlField = str_replace('http://', '', $page->yourUrlField); echo $yourUrlField;
-
$f = $this->modules->get("InputfieldMarkup");
-
I never liked tinyMCE. Always angry with the code it creates or corrupts. So I was far from a big fan. Then I discovered PW, was very happy with the markdown it provides. But then after a while I discovered how well tinyMCE is integrated, how well it was configured. PW has changed the way I think of tinyMCE. It does function very well. The way i think to go for WYSIWYG editors don't drop tinyMCE till PW drops support for older browsers. Or don't drop it at all. Maybe we need a $config->onlyHtml5Browsers = true; ( or something ) That could make some room for third party WYSIWYG alternatives based on new standards.
-
A basic search is included in a clean ProcessWire install. You just have to expand the options there.
-
@onjegolders, you're doing more then great !
-
It's ver flexible doing it the Page way: I had a csv list of all cities in Holland. (3500) or something I created a "folder" cities and imported all cities with the import CSV module into this "folder". Now now i'm able to use the "Page Autocomplete" in the manager. love it, see ryans movie.
-
-
Oké, tnx for your reply netcarver & ryan. I love regular expressions to, this will be a big + for me. I didn't understand at first (my poor reading skills) that the regex that the developer would add was also applied server side. This is huge !!!