Recently Browsing
0 members

Similar Content

Does anyone here have experience installing a translation module that creates new pages for multiple languages?
I am assuming when these pages are generated, they are indexable by google as "new" and "fresh."
Thoughts?

I have been looking up everything I can to try to find what's going wrong with this. I have a very simple form (title and file field set to multiple) that will create a new page with the name and attachments. However, it appears that I am missing something crucial as only 1 item gets uploaded to the field. Here is my code:
<?php
$uploadpage = new Page();
$uploadpage->template = "dashboard";
$uploadpage->parent = $pages->get("/testing/");
$uploadpage->title = $sanitizer->text($input->post->new_title);
$uploadpage->save();
$uploadpage->setOutputFormatting(false);
$u = new WireUpload('test_upload');
$u->setMaxFiles(6);
$u->setOverwrite(false);
$u->setDestinationPath($uploadpage->test_upload->path());
$u->setValidExtensions(array('jpg', 'jpeg', 'gif', 'png', 'pdf'));
foreach($u->execute() as $filename) {
$uploadpage->test_upload->add($filename);
}
$uploadpage->save();
?>
I have the max files set to 6, and have a foreach loop to add the files, but it is only uploading one. Does anyone see where I might have gone astray?

Here's my Norwegian language pack for ProcessWire. I've been adding translations over some time, to suit my own projects users needs.
Last updated:2017/10/02
Status:Not yet complete. Translations that non-superusers will see is prioritized.
Name:ProcessWire-Norwegian-Language-Pack-nb-NO
Translated using:ProcessWire 3.0.77 dev
Number of files:177 wire files and 68 site files – ranging from just started to completely translated. The site files includes translation some free and some pro modules, see the complete list in the README.md at GitHub.
Available at Github:https://github.com/franctic-aerobic/ProcessWire-Norwegian-Language-Pack-nb-NO

Simple example for loading template specific CSS file.
This example asumes that you have your CSS file in a directory relative to template root.
Like:templates/css/my_template_specific.css
Also i use in the template a simple text field to hold the name of the CSS file i want to load.
I call this field 'css_file'
Use what you feel comfortable with.
So in your header section of the DOM notice the "page specific CSS" part?
Thats were the magic happens. What happens is that we check to see if the file exists in the CSS dir relative to template root.
And if it does we load it. Simple and effective.
I load all other CSS that is used all over the site in global_styles.css first.
And make sure you load template specific last, because then you can easily override CSS in global.