louisstephens

Members
  • Content Count

    379
  • Joined

  • Last visited

Community Reputation

185 Excellent

About louisstephens

  • Rank
    Sr. Member

Profile Information

  • Gender
    Male
  • Location
    Greenville, SC

Recent Profile Visitors

2,562 profile views
  1. From my last post, I was given a good idea on how to count the repeater items, and it worked wonderfully. I got my code working well and the columns (based on the count) all work well as well. Now, I have a head scratcher on my hands. <?php $buttonsIncluded = $page->special_custom_buttons->find('special_custom_buttons_include=1'); $buttonsIncludedCount = count($buttonsIncluded); $buttonsIncludedCountAdditional = $buttonsIncludedCount +1; echo $buttonsIncludedCount; ?> <div class="row"> <?php foreach($buttonsIncluded as $button): ?> <?php if($button->custom_buttons_include): ?> <?php if($buttonsIncludedCountAdditional == 2): ?> <div class="col-6"> <a href=""><?php echo $button->custom_buttons_text; ?></a> </div> <?php elseif($buttonsIncludedCountAdditional == 3): ?> <div class="col-4"> <a href=""><?php echo $button->custom_buttons_text; ?></a> </div> <?php elseif($buttonsIncludedCountAdditional == 4): ?> <div class="col-3"> <a href=""><?php echo $button->custom_buttons_text; ?></a> </div> <?php endif; ?> <?php endif; ?> <?php endforeach; ?> </div> All of this is included in a larger foreach statement that is pulling in other data (like body copy etc etc) from a Page Table field. As you can see in my code above, I am adding "1" to the count, so I can have space in the grid layout for a new button. So, right now: it looks something like: [repeater button] [repeater button] [repeater button] [space for new button] What I really need to do is to pull in the button from the Page Table and add it into the new space so it looks like: [repeater button] [repeater button] [repeater button] [button from Page Table] Is this even possible todo, or is there a better way to go about this? *Edit* So, I really just overlooked something quite easy here. Since the grid is based on 12 columns, I could just take 12 and divide by $buttonsIncludedCountAdditional which would give me the remaining col width to use outside the foreach loop. I was trying to make this too complicated.
  2. Thanks wbmnfktr! That did the trick
  3. Is it possible to use count() to return a number of repeater items don't have a checkbox checked? In my current set up, I have a repeater on the page "dev_repeater" with a checkbox called "dev_repeater_exclude". I need to get a count of the current items that do not have it checked so I can pass it to my css grid to alter the column width.
  4. louisstephens

    I believe you are right in thinking that it only works with "field!=something (though please correct me if I am wrong). However, there is this module https://modules.processwire.com/modules/custom-inputfield-dependencies/ that might help you out a bit in your quest.
  5. louisstephens

    Thanks Sergio, I had it open in my browser and just forgot to post it . However, I did find if the video is unlisted, then there are still no related videos shown.
  6. So I don't know how many have noticed yet, but Youtube has depreciated "rel=0" at the end of the embedded url in September 2018. For some reason, I just noticed today on a site I was working on. If you do not use the rel, you will get related videos across youtube, but if you use it, you will only get related videos from the same channel. Just wanted to share in case people did not know and they needed to make a change on whatever they were working on.
  7. louisstephens

    I really like the new design Ryan! I have only one suggestion; would it be better to move "Getting Started" to somewhere a little easier to find for new users? Thus far, I have only been able to access it here, and it is tucked away from the main sidebar on the right.
  8. louisstephens

    There is a "solution" posted on stackoverflow that might fit your needs.
  9. louisstephens

    I currently use the Cobalt2 Theme by Wes Bos, and I like it thus far. I believe in his themes he uses a paid font for functions etc, so I found something similar to use in my own: It took me a few minutes to get use to the new font, but I like it a lot now. To me the theme is a nice alternative to the dark theme that I use to love so much.
  10. louisstephens

    Hey Leftfield, it might help us better answer your question if you can describe in more detail your current template set up. For example, I use a template structure where the head is included into every template utilizing <?php include("./inc/header.php"); ?> This way, I call some global settings in the head, and it is included everywhere. However, some people use the delayed output approach.
  11. louisstephens

    Well, In your template file, you could do: <link href="<?php echo $page->httpUrl; ?>" rel="canonical" /> This would produce something similar to https://domain.com/parentpage/childpage or however your site is set up.
  12. louisstephens

    If you use Robin's field width module, the columns appear to work just fine. This might be a "work around" until Ryan has a chance to update the Uikit.
  13. louisstephens

    Hey dreerr, are you currently viewing the admin on mobile? I ask only because in your screenshot, the tab looks to about about 50%. From my understanding, if the width of the fields/container are 50% on mobile (or smaller devices), the fields will collapse and stack accordingly.
  14. Just a quick question, when you look in the assets folder, are all of your images there?
  15. louisstephens

    From what I understand, you could create/publish pages regardless of roles/permissions. However, if you were to wrap the page creation in an if statement like : if($user->hasPermission('permission-name', $page)) { // user has this permission, for this $page } then that person with the permission could perform whatever action you created.