Jump to content

countchocula

Members
  • Posts

    4
  • Joined

  • Last visited

countchocula's Achievements

Newbie

Newbie (2/6)

0

Reputation

  1. Thank you, your post really helped. I couldn't seem to get the $checkstatus->is(Page::statusUnpublished) to work (even when changing it to statusHidden) but what I did was this: foreach (...) { $checkstatus = $homeblock->PageLink->status; if ($checkstatus == 1) { echo 'show stuff'; } else { echo 'nothing to show'; } } Not sure if that is the most economical way to do it but it seems to work. $homeblock->PageLink->status outputs a number for each repeater item (1 = published) and doesn't show anything that isn't published. Now i just need to figure out a way to tidy up the backend
  2. Is there a way to automatically remove repeater fields after a certain date? My homepage has a repeater field on which has several items which link to different pages on my site. Each page is for a different concert so after the concert has passed then those pages are automatically set to hidden. The issue is that the repeater field item on the homepage that links to each concert page is not automatically hidden when the concert passes so unless it is manually removed then you get a dead link from the homepage. That wouldn't be a problem but the site isn't looked at every day and so occasionally things get left on the homepage that have passed. Let me know if that isn't clear, I am not the best at explaining sometimes.
  3. thank you, i will take a look at that. carousel is not my choice.....thanks for the help though
  4. I have an image and video carousel that I want to use on a page and have it be editable via processwire. The problem is that the code for images and video is completely different. What is the best way to go about making one repeater field where you can pick either a video or image? I thought about having nested repeaters but not sure if that would work. I want it to be possible to order the slides so having them as separate repeaters wouldn't work either. I am a bit stumped. Any help would be great. Images: <div class="rsContent"> <img class="rsImg" src="abc.jpg" alt=""> <div class="infoBlock infoBlockLeftBlack"> <h1>...</h1> <h3>...</h3> <h4>...</h4> <p>....</p> etc etc </div> </div> and for video is this: <div class="rsContent"> <a class="rsImg" href="abc.jpg" data-rsVideo="https://www.youtube.com/"></a> </div> Thanks you
×
×
  • Create New...