Jump to content

fbg13

Members
  • Posts

    344
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by fbg13

  1. I made a new color style for the default theme PW 3.0.25. I just copied the default theme's folder to site/modules, changed Default to DefaultExtra so it doesn't conflict with the default one and added an extra css file.To install unzip archive to site/modules, go to modules page, hit refresh, install theme, choose style (Clear Sky), go to profile and activate DefaultExtra. AdminThemeDefaultExtra.zip
  2. You can and should add the option in the config file inside your site directory. The wire/config.php has the defaults and the site/config.php has your custom config which overrides the wire ones.
  3. Seems like a permission issue. Are you logged in as admin?
  4. I'm not sure I understand what you want, but if you want categories like in wordpress, this is how I did them. I have the above tree. Taxonomies = taxonomies template Genre, Audio = taxonomy template Horror, Parody, Drama etc. = terms template The templates have only the title field. Then for each taxonomy (genre, audio, whatever you need) i created a field of type page, in the input tab choose the corresponding taxonomy for your field under Parent of selectable page(s) and a little lower you have the Input field type option i chose AsmSelect but you can try them out. Now go to the template for the page you want to add the categories and add the field(s) you made. To display them i made a function so they link to an "archive" page. function getTaxonomyTerms($taxonomy, $sep) { $terms = ''; $x = 1; foreach ($taxonomy as $t) { $link = '<a href="'. wire('config')->urls->root . $t->parent->name.'/'.$t->name.'">'.$t->title.'</a>'; // if it's not the last item and a comma $terms .= ($x != count($taxonomy)) ? $link . $sep : $link; $x++; } return $terms; } // used like this echo getTaxonomyTerms($page->genre, ', ') This will link the terms to domain.tld/taxonomy/term i.e. domain.tld/genre/horror The above will not work since I have removed the taxonomies from the url. If this is what you need then i'll explain that part too.
  5. Should the "New page from inputfield" option work on PW v3? Cause it doesn't seem to work for me. I have this tree for adding taxonomies and terms: Taxonomies > Taxonomy > Terms (these are templates with only the title field). Then i have a field tags of type page with parent Tags (taxonomy template), template set to terms , label is title(default) and input field type asmselect. Taxonomies > Tags > tag1, tag2, tag3 The asmselect field is displayed on the page and populated with the tags but i don't have the option to create a new term. I hope you understand my jumble.
  6. @horst i changed to v2.7 to test it and changed the code to add the tag if the file name matches a string: //$wire->addHookAfter("InputfieldFile::fileAdded", function(HookEvent $event) { $wire->addHookBefore("InputfieldFile::fileAdded", function(HookEvent $event) { $log = wire('log'); $inputfield = $event->object; // handle to the image field if(!$inputfield instanceof InputfieldImage) { // we need an images field, not a file field return; // early return } $p = $inputfield->value['page']; // get the page $image = $event->argumentsByName('pagefile'); // get the image if(strpos($image->filename, 'string')) { $log->error('match'); $p->get($inputfield->name)->trackChange('tags'); // prepare page to keep track for changes $image->tags = 'sss'; // add the tags list as string $p->save($inputfield->name); // save the page images field }else{ $log->error('no match'); } }); But the tag is not added, am I missing something? The error log show that the string matches.
  7. @horst $p seems to be false for me
  8. I probably could, but i don't think this will improve my work flow. But still, please share the code.
  9. Hello! I just found processwire yesterday (actually i heard about it before, but never looked into it) and installed it to play around. I'm really impressed, as a guy who only used wordpress i like it very much and i tried to replicate one of my sites in processwire and so far it seems doable, the taxonomies will be a little tricky i think. Now to the main point, i've read a blog post here giving some tips, one tip was to use only one image field and to group images by tags. The problem: there doesn't seem to be a way to add a tag to multiple images at once, making the process inconvenient. Would it be possible to add a prompt for defining a tag before selecting the images and the uploaded images will have that tag.
×
×
  • Create New...