Jump to content

louisstephens

Members
  • Content Count

    397
  • Joined

  • Last visited

Community Reputation

192 Excellent

About louisstephens

  • Rank
    Sr. Member

Profile Information

  • Gender
    Male
  • Location
    Greenville, SC

Recent Profile Visitors

2,695 profile views
  1. I have not implemented this yet for myself, but I did stumble across this in my bookmarks. It looks promising with srcset etc.
  2. Well darn, I set $config->advanced to true, and nothing seems to be changing for me on the field settings. Is there something else I need to change out? That was completely my fault. I changed a config in the wrong folder without thinking. Thanks adrian, that solved the issue.
  3. Thanks adrian! I went to the advanced tab, but perhaps I am missing something. The only options present are: tags icon autojoin global I then went through tracy to delete it, but I am still met with the samed flagPermanent error message. I will continue to poke around and see what might be causing it.
  4. Hey iipa, Just curious, how are you calling the file in your template? I have used the following without issue in the past. <link rel="icon" type="image/png" href="<?php echo $config->urls->templates?>/favicon.png" />
  5. Hopefully this is the right place, if not, please move it to the proper sub. I installed the multi language module on my development (sandbox) set up not too long ago to test out a few things. From the start, I ran into some issues with dependencies not being met/installed, so I thought that I would simply just uninstall what had been. Unfortunately, that took me down a road of using some code in my home template to remove the modules (cant find it at the moment). After some struggling, I finally got it uninstalled, but it left behind 3 fields, language language_files language_files_site I thought that I could simply remove them from the languages template and then delete them, but I get the following error: I was wondering, is there a way to remove these using the api? I couldn't add any new users to the setup until I made "language" not required, but I was hoping to just remove all of the fields.
  6. I have used colorlib in the past. However, I don't really use pre-made templates all that much. I do find that writing the code from scratch really is beneficial to my workflow as I know exactly where everything is/functions. Are you looking for basic layouts, css dependent layouts (bootstrap, css grid, etc etc), or are you looking for processwire specific templates? On that last point, to my knowledge there are not too many out there/if any that are plug-n-play.
  7. From what I read, it actually returns the nth item from the array. Returns the single item at the given zero-based index, or NULL if it doesn't exist. Couldn't you just do: $count = -1; foreach($page->images as $photo) { echo "<li uk-slideshow-item='{$count}'><a href='#'><img src='{$photo->size(150,100)->url}' alt=''></a></li>"; $count++; } ======= Dragan beat me too it.
  8. I actually did exactly as wbmnfktr suggested in a previous project (still in development). At first I was a bit hesitant of having to create new ingredients every time I wanted to add a new unique recipe, but the pros quickly outweighed the cons. It makes filtering on the front end a lot better/easier, as well as makes new recipes easier.
  9. So I was tinkering around with the "select fields" field type and added it to a repeater. My thoughts were I could have a user select a field (textarea, text, etc etc) that I defined and give it a name (another field in the repeater) and create their own form on the page. To be honest, I am now a little lost with rendering the form and mailing the results as potentially the form will be unique and custom every time. The only way I know to handle the output is by going about it this way: $forms = $page->form_select_fields; foreach($forms as $form) { if($form->name === "form_input") { //output input with custom name } elseif($form->name === "form_textarea") { //output input with custom name } } Is there a better way to go about rendering the elements from the repeater? As far as the custom sending goes, I am really at a loss since it would be pretty dynamic. Has anyone used this type of approach, and if so, how did you handle this without going insane?
  10. I haven't had this issue yet with file attachments. However, I have had several timeouts with a very simple form (4 inputs) that create new pages using the wiresmpt module.
  11. I have noticed this for awhile now. I guess I just always assumed that it "opens" the page tree for what you clicked on: - Parent Page (id:1) -- Sub Page (id:2 - has 4 children) -- Sub Page (id:3) --- Sub Sub Page (id: 5 - currently open) -- Sub Page (id:4) If you were on the "Sub Sub" page of id 3 and clicked on the Sub page with id of 2, it would "open up the tree on id 2 and collapse the rest of the tree. Well, that has been how it has been for me.
  12. Have you looked into Admin Restrict Branch: https://modules.processwire.com/modules/admin-restrict-branch/ ? This should allow you to achieve the first part of your post.
  13. Thanks @bernhard! That was exactly what I was looking for. Now I'll continue down the path of learning hooks, and hopefully stop making mistakes like: $p = new Page(); $u->template = "scripts"; $u->parent = wire('pages')->get($page->id); $u->title = "Test"; $u->name = "test"; $u->save(); Which obviously just blows up in your face.
  14. So I have been diving into hooks lately, and I am enjoying them thus far. However, I guess I am a bit stumped on how to achieve what I want too. I am trying to set up a hook that would create a new child page when the parent page is saved. However, when you save the parent page a second time, I just need to update the child page without creating multiple child pages. What would be the best way to go about this? So after rereading my post, I believe it is a bit vague so I will try to explain more. The Goal: Create a page with a template "one". Once the page is created/saved => create a new child page with the template of "two" If the parent is saved anytime after, do nothing to the child page (limit the parent page to one child page) The parent page is really just being used to output content, whereas the child page is being used to pull out the some fields from the parent to be used elsewhere. I might have made this too complicated in my head.
×
×
  • Create New...