Leaderboard
Popular Content
Showing content with the highest reputation on 03/28/2019 in all areas
-
As @szabesz mentioned, why not simply add the .php to the page name and disable "Should page URLs end with a slash?" in the template? Just tried, works well. You may even have a /index.php...7 points
-
There's a big list of VS Code extensions here that is regularly updated. https://github.com/viatsko/awesome-vscode4 points
-
@Autofahrn & @szabesz thank guys! This works like a charm! ❤️ Didn't even know about that possibility ? In my opinion? This is the way to do it! Thanks again.. I appreciate it!2 points
-
@Nick Belane you easily can change this yourself. Please see the previous discussion here.2 points
-
Have you tried this: https://processwire.com/talk/topic/45-url-schema/?do=findComment&comment=150 "ProcessWire will support .html extensions. You just have to make them your page names, i.e. "about.html" rather than "about", or look for them in urlSegments. I've actually done this before, though for specific pages (like /sitemap.xml), not on a site-wide basis. But I don't see any problem with it conceptually."2 points
-
A community member raised a question and I thought a new sanitizer method for the purpose would be useful, hence... Sanitizer Transliterate Adds a transliterate method to $sanitizer that performs character replacements as defined in the module config. The default character replacements are based on the defaults from InputfieldPageName, but with uppercase characters included too. Usage Install the Sanitizer Transliterate module. Customise the character replacements in the module config as needed. Use the sanitizer on strings like so: $transliterated_string = $sanitizer->transliterate($string); https://github.com/Toutouwai/SanitizerTransliterate https://modules.processwire.com/modules/sanitizer-transliterate/1 point
-
Hi all, wanting to modify the CSS of a core module (JqueryMagnific in my case), but not to touch the files in \wire\, I found this older blog entry: https://processwire.com/blog/posts/processwire-core-updates-2.5.14/#multiple-copies-of-the-same-module That might be helpful for others, too. (It's pure fun using PW!)1 point
-
I've uses LastPass a couple years. Love having the chrome extension at hand to get any pass. Autofill might not always work great tho.1 point
-
1 point
-
1 point
-
Please share your possible fix, I don't remember there's anything like this built-in.1 point
-
This module seems really useful for the club membership system I am building - it allows members to easily edit their own records without access to the rest of the back-end. However, I also need to use page-add mode and I can't get this to work fully. It seems like there is a "parent" but no "template" setting for page-add so, if a parent has a family of more than one template allowed, there is no API to select the right template. I think I can see how to hack FrontEndEditLightbox.module to fix this, but I wonder if I am missing something, or whether it would be better for @tpr to update the module? Thanks.1 point
-
ok i'll be able to work on it starting next week, and will check back in here once i have something to report... Doh! just checked the modules directory and Ryan already made the switch... thx @ryan! Will proceed with testing now for ensuring we don't break things with the refactored code, might take a week or so on this...1 point
-
Agreed. I think that perhaps the best solution is for you to maintain the module, integrating anything applicable from my version. I’d be happy to help with this process.1 point
-
Here's @Robin S code adapted to produce the following thumbnail navigation (semi-transparent thumb #98 is the current one): <?php // Number of thumbs to show $limit = 9; // Get the number of visible siblings $num_siblings = $page->parent->numChildren(true); // The default start value is zero $start = 0; // If the number of siblings is greater than the limit then we need to adjust the start value if($num_siblings > $limit) { // Get the halfway point of the limit $half_limit = floor($limit / 2); // Get the index of the current page relative to its siblings $index = $page->index(); // Adjust the start value to keep the current page within the sibling links if($index > $half_limit) $start = $index - $half_limit; if($num_siblings - $start < $limit) $start = $num_siblings - $limit; } $items = $page->siblings("start=$start, limit=$limit"); // Next page and previous page relative to current page $next_page = $page->next(); $prev_page = $page->prev(); // Next and previous SVG icons $left_arrow = "<svg role='img' aria-labelledby='previous-icon' class='icon icon--inline' height='24' width='24'><title id='previous-icon'>Next photo: {$page->prev->title}</title><use xlink:href='#icon--left-arrow'></use></svg>"; $right_arrow = "<svg role='img' aria-labelledby='next-icon' class='icon icon--inline' height='24' width='24'><title id='next-icon'>Previous photo: {$page->next->title}</title><use xlink:href='#icon--right-arrow'></use></svg>"; ?> <?php if($items->count > 1): echo "<div class='thumb_gallery'>"; if ($prev_page->id) echo "<a class='thumbnail' href='$prev_page->url'>$left_arrow</a>"; foreach($items as $item): $number = $item->index() + 1; $current = null; if ($item == $page) $current = " aria-current='page'"; echo "<a$current class='thumbnail' href='$item->url'>"; echo "<img class='responsive-images thumbnail__image' src='{$item->photo->size(150,150)->url}' width='75' height='75' alt=''>"; echo "<span class='thumbnail__label'>$number</span>"; echo "</a>"; endforeach; if($next_page->id) echo "<a class='thumbnail' href='$next_page->url'>$right_arrow</a>"; echo "</div>"; endif; ?> I hope this can help someone else. Thanks again @Robin S !!1 point
-
Hello, we found the following solution that is quite similar to the suggestion from Autofahrn. Our setup includes two languages - de (german) as default for *.de domain (default language) - en (english) for *.com domain In _init.php there is just: if (preg_match("/(:2284|\.com)/", $config->httpHost)) { $user->language = $languages->get('englisch'); } Your question no. 2: It is important that you configure the settings for your root page to "/" for each language. In that case PW doesn't prefix your URL paths for the children. Be careful! In case you use the front page editor - when a child page has the same path for every language, the front page editor is not able to save the page correctly. You have to use the backend. But if there are differences, for example *.com/imprint and *.de/impressum - the front page editor works fine.1 point
-
1 point
-
You can also use the following code in your site/ready.php: <?php if($page->template->hasField('name-of-your-ckeditor-field')){ $string = $page->name-of-your-ckeditor-field; //create string replace for blockquote $string = str_replace('<blockquote>', '<blockquote class="blockquote">', $string); //here you can add further manipulations.... //.............. //finally set the value back with manipulations $page->name-of-your-ckeditor-field = $string; } Replace "name-of-your-ckeditor-field" with the name of your field. In this case you can use the default blockquote button from CKEditor. Best regards1 point
-
I think maybe the original question was not about changing the path to the folder where templates reside, but rather about being able to put template files in different subfolders of site/templates (or something different, adjusted with the methods, described above). Although you can change the file used as template file for the template in Admin -> Setup -> Templates -> Edit Template on the Files tab, you cannot point to something like "views/product/product.php" there as far as I know (at least it did not work when I tried). You can only choose different file in template folder. It could be just great if you could.1 point