...I added $today_date = date('Y-m-d'); and...
Seemed to fix this.
I've a got the list of events like so...
However I want to hide any event older than today's date.
How do I filter the events to only that are only greater than or equal to today's date?
Thanks for confirming Drew.
This would explain some editors getting in a pickle on sites with listing where an image is the key content. Editors (especially beginners) leap in to create content before they've gathered the relevant material like the key image!
I generally would create a fallback image for these sites but of course there's no feedback in the Editor that this is happening.
There is a case where stopping publishing where an image is required would help.
Checking previous sites it appears that the required="true" does work on type="image"
Can anyone confirm this is true?
...this is very worrying if you can't specify that an image must be required. Help!
...forgot the `'template' => '_page_banner_image.html',`
...no wait I think I've got it...
Thanks it sort of works as the comparison can be made in the 'Products' region.
However the Image banner being `suppress="true"` in the in the detail template is being drawn and published to another place on the page using...
...and the 'default_banner' ID is not turning up in the _page_banner_image.html template.
How to I get 'default_banner' in that template?
Thanks. I think I've got this correct and the default banner field is now available in the 'Products' region.
However when I use...
This as it stands outputs the detail page as a full list and not getting a single item on say page (product_page.php?p=my-page)
How do I sort 'Products' on a single slug query?
Could you not manage the default banner with another region?
The default image banner template is in another region. It's used in the list page (product_page.php) and the other template is using detail_template_with_banner.html in the (product_page.php?p=every_other_page).
Is there a way of getting a field from a region in (product_page.php) into a region in (product_page.php?p=every_other_page) to do a compare with perch:if in a template?
I thought they had to be in the same runtime?
Or should the default banner template be in a shared region to make it available?
Wondering if there's a way of achieving the following...
I have a list and detail page where the user can upload a banner image to override a default banner image (set for the whole list) that I've uploaded to a resources folder outside of Perch CMS (for those cases when an image is not available when adding a new item to the list).
Which is easily achieved in a template...Code
- <perch:if exists="bannerimage">
- <div class="static-banner" style="background-image: url(<perch:content id="bannerimage" type="image" width="1400" height="200" crop="true" help="Add a full width banner image with a minimmum with of 1400px" />);">
- <div class="static-banner" style="background-image: url(../default-static-banner.jpg)">
However is there a way of the user changing the default banner themselves within Perch?
Currently the default banner image has to appear on the list page as the default banner image but would also show on a single item detail page when nothing has been uploaded to override it.
I have a list and detail page sorted by 7 categories. Fine all that works.
I've extended this so that each category name has an css class added to give a unique colour in the category list by editing a category template and adding <perch:category id="colour" />. Fine all that works.
The problem is I need to display the active category with it's colour/class inside the perch template on other items used in the detail.php page when it's selected.
Can anyone point me in the right direction to do this?
Back in the days this was an easy remedy to fixing URL's adding the CMS.
However these days there's a mix of users adding either http:// or https:// which mean there's how a 50% chance these links are breaking and annoying the client.
Is there anything to help fix this?
Yes it does work. Turns out to be a different issue of a FTP client failing to upload a file correctly. Duh.
Can I use Using<perch:blocks> in a Perch Blog templates? It looks like you can't.
The issue was tracked down to a rougeperch:if - it's fixed