-
Posts
530 -
Joined
-
Last visited
-
Days Won
11
Community Answers
-
Sergio's post in Is it possible to load images without using 'echo'? was marked as the answer
Hi kathep!
You just need to store the images in a variable just like $content is. So, change the loop:
if (count($page->images)) { $images = ''; foreach($page->images as $image) { $image = $image->size(800); $images .= "<img src='{$image->url}' /><br />"; } } ... rest of code // Primary content goes here
$content = $assignment_w_heading . $semester . $images . $page->body;
You can remove the <br /> after each image if you prefer.
-
Sergio's post in Using an empty language pack as the default (front end) language. was marked as the answer
Just to be clear: it's not required to install a language pack. A language pack is nothing more than strings already translated. ProcessWire will not depend on that, it will always use the default if a translation if missing.
Do you have lots of data already? If you don't, you can do the following:
On setup > languages
1 - Change 'default' language title to Danish
2 - Change 'da' language name to 'en' and its title to English
In every page, copy the content from one language tab (on every field) to the other. (yeah, I know...)
===========
You can also use the module Migrator to export everything to a json file, open it and find/replace things there (I never tried, though)
-
Sergio's post in Uploading files to page(s)? was marked as the answer
It's pretty easy, just create a new "File" field and assign it to your template (for instance, the Basic Page template).
To create a field, go to Settings > Fields on the admin.