-
Posts
2,769 -
Joined
-
Last visited
-
Days Won
31
Everything posted by Martijn Geerts
-
Think you just forget the $this
-
yep, the structure I've drawn in the 4th post. $repeater = $page->repeater; // assumed that your repeater called: repeater $count = (int) count($repeater); // amount of columns $percentage = round((100 / $count), 5); // round the percentage if($count) { foreach($repeater as $item) { echo "<div style='float: left; width: {$percentage}%;'>\n"; echo "\t<h4>{$item->title}</h4>\n"; if(count($item->pages)) { echo "\t<ul>\n"; // if the fieldtype page is called pages foreach($item->pages as $p) { echo "\t\t<li><a href='{$p->url}'>{$p->title}</a></li>\n"; } echo "\t</ul>\n"; } echo "</div>\n"; } }
-
See the video ryan made about repeaters: http://processwire.com/videos/repeater-field-type/ inside the repeater: title input type Page (Multiple pages (PageArray) - Input field type AsmSelect)
-
I Think you should use a default so you don't have to set the urls on every page you create. a. The Selectable Pages you should select the pages where you want to have the link to. b. you need one repeater, in wich you can create for example 5 repeter-items. ( Every repeater-item then contains a title for your header and an array of pages for your list of links ) (So basicly every "row" is a column) ( You have to foreach the pages array inside the repeater to, and output the individual page )
-
If you want this to set on all pages individually you could do this if you have a small amount of pages. But this approach is bad for scaleability. ( I don't think you should do this for 10 pages + ) You could however, set a default approach. On possible way to archief: - add your repeater field to the home template. - then add the field to your let say "basic template" $homepage = $pages->get('/'); $repeater = count($page->repeater) ? $page->repeater : $homepage->repeater; Then foreach your $repeater, beware that you have to foreach your pages array inside the repeater items to. So, if there are no repeater rows in the basic-page, the footer links set in the homepage is used. - repeater field - repeater-item // represets a column - title - fieldtype page ( array ) * page selected * page selected * page selected * an other page selected ) - repeater-item // represets an other column - title - fieldtype page ( array ) * page selected * page selected * page selected * an other page selected ) - repeater-item - title - fieldtype page ( array ) * page selected * page selected * page selected * an other page selected ) etc.... * code blocks works funky in editor (chrome / mac / Version 24.0.1312.56)
-
Joss, Sorry, I'd miss that you mentioned that before. Will come back to this thread, it's bed time for me right now.
-
I just thinking about the images. Now on the tinyMCE image you can select images from another page. But if there's a module setting for setting a parent from where to find/browse those images/pages. (default /) Then you're are able to restrict getting images from other Pages ( wich can be deleted etc. ) This way you could build an other "pages tree" where you could store Images you want to re use often.
-
lol
-
You've already exceeded the 50mb data quota on this forum with only plain text. ( I won't tell pete )
-
You could use a repeater field with inside: title input type Page (Multiple pages (PageArray) - Input field type AsmSelect) Then the amount of repeater items would be the amount of columns. ( for columns width, calculate the percentage, easiest to use inline style for it. ) So the title would become the header, each repeater field could output the url for pages you selected.
-
Fancybox - Include own script or use the module
Martijn Geerts replied to DV-JF's topic in General Support
And if you want to know the options, goto 1.2+ on the fancybox website. ( old options ) -
Fancybox - Include own script or use the module
Martijn Geerts replied to DV-JF's topic in General Support
call: $modules->get("JqueryFancybox"); from whitin your template Then the CSS & the JS will be in the script & css array. use them in your <head> foreach($config->styles->unique() as $file) echo "<link rel='stylesheet' href='$file' />"; foreach($config->scripts->unique() as $file) echo "<script src='$file'></script>"; -
thanks...
-
Troubleshooting PHP concatenate assignment operator for sitemap
Martijn Geerts replied to MarcC's topic in General Support
Actually had the same issue as you had marc. Soma solved that for me then. I left out the tab & new-line as it provides more flexibility in CSS. for example: ul { display: block; text-align: center; } li { display: inline; } This way you don't have the extra "white space" between the li items & you can text-align the li's. For navigations etc. I use a modified MarkupSimpleNavigation from Soma that don't output any tab, newline or any other white-space thingy. Hopefully Soma will simplify his module & leave them out by default. (I only use generated source if I'm not ripping JS ) example: http://codepen.io/anon/pen/FDrim -
Troubleshooting PHP concatenate assignment operator for sitemap
Martijn Geerts replied to MarcC's topic in General Support
function siteMap($page, $output='') { $output .= "<li><a href='{$page->url}'>{$page->title}</a>"; if($page->numChildren) { $output .= "<ul>"; foreach($page->children as $child) $output .= siteMap($child); $output .= "</ul>"; } $output .= "</li>"; return $output; } $homepage = $pages->get("/"); $siteMap = "<ul>" . siteMap($homepage) . "</ul>"; Think this will work Lesson: - first look if Soma, Diogo, Nik, Ryan, etc. etc. are active on the forum. - then, don't post at all ( cause they will be first ) -
InputfieldTinyMCE should be in /site/modules/
Martijn Geerts replied to Nico Knoll's topic in Wishlist & Roadmap
If we accept that IE8 and below no longer can access the admin then the way is free for smaller/better editors. Till that time I think we should stick with TinyMCE. ( damn well configured in processwire ) Rather see those modals updated with a "retina checkbox" & the ability to save a preset for those settings. If the preset is set, the editor is not able to set the width from within the modal. Or disable the retina setting & alignment. -
-
Never to old for learning. It's exactly as diogo suggests. Thanks adamkiss & diogo. Will remember your module adamkiss, tnx for your work. I will use it after I translated it to dutch.
-
$then = new DateTime((is_int($timestamp) ? "@{$timestamp}" : $timestamp)); Learn me PHP, whats is that @ sign doing there ?
-
Maybe just me, but think to see increase after CMS critics award. Then there're comin' here and feel a cozy community.
-
1001 things I love about ProcessWire, but the vision behind it I love the most.
-
I had the same issue with 2.2.12 . I removed the installed.php, installed it again & then run the sql again that was in the profile. After that problems solved. ( was not blank profile but my own delegate-profile ( will test again & want to simplify the profile )