Posts by JordinB

    you're pulling in something like this on the category page ?


    turn on perch debug, you will see it matching routes and detect which route is matched.


    Its normal that tags/awards won't work because the forward slash is not a part of a valid slug.


    i am surprised a little that the newsroom/category/awards is not being directed to that page though.


    Have you tried with a starting slash in the route like: /newsroom/category/[slug:cat] I wonder if its because its a subpage.

    yeah, so you really don't need blocks for this. you're choice is either a multi-item region that you can edit in a list/detail type of cms page, or create 1 single region and add a repeater for each image.


    Either way you can drag and drop the items to reorder them. and your template will basically be the same or similar to :


    Code
    1. <!-- image_link.html -->
    2. <a href="#<perch:content id="image" type="image" label="Image" />"><!-- Link to your fullsize lightbox image -->
    3. <img src="<perch:content id="image" type="image" crop width="200" height="200" />" alt="<perch:content id="caption" type="text" label="Image Caption" />" /></a>

    if you're using the multi-item method, the template of the region would be 'image_link.html'


    if you're using the repeater you could do :

    ok,


    Perch needs to know that /about/newsroom/category/tags/rewards is the same page as say /about/newsroom/category/tags/prizes. So the category page needs to have a url rule setup to parse that information so that when Perch sees the url, it knows which page is supposed to be rendered and what the category is in the url:


    Here is my blog archive page setup:



    Note that i have a bilingual site, so the url patterns are matching french or english.. but thats not the important part here, your urls won't have that.


    you can see that it has 2 url patterns:


    1. /en/blog/archive/2019 which will populate a variable called $year with 2019 and be available on the archive.php page

    2. /en/blog/archive/some-category-slug which will populate a variable called $categorySlug with the value some-category-slug and that will be available on the archive.php page.


    So when on the archive.php page, if there is data in $year, it renders the blog posts by year, if there is data in $categorySlug, it renders the blog posts by category.

    drewm - I understand with your recent new roles, time is a valuable commodity. I'd be more than willing to help on a volunteer basis (no strings attached) to do some PR's to fix bugs anything else you'd need help with.

    If you turn on Perch Debug from your config.php, and go to the forms app, select your form and go to the form settings tab, at the bottom of the page, you'll see the debug info and you'll see a line like:


    Using template: /path/to/your/perch/site/perch/templates/content/your-template-name.html


    of course the path will be the path on your server and the 'your-template-name.html' will be the name of the template for the form.

    Shouldn't be. All i'm doing is using categories. The post has a categories checkbox section, so multiple checkboxes for each category, and in the post template, i link the category slug to my archive page. /blog/archive/{categoryslug}. The archive does the following to render the list:


    Code
    1. perch_blog_custom([
    2. 'category' => $categorySlug,
    3. 'cache' => false,
    4. 'template' => 'blog/post_in_list.html',
    5. ]);

    on my site i have a simple blog, there is only 1 section, but each of the articles can be tagged with multiple subjects. At the bottom of each article i have a list of "categories" which groups similar articles together. If you click on the category it goes to a page where all the articles listed are of that category.



    it that what you're looking to achieve ?

    That's quite possible. Blocks doesn't alway seem to 'play nice' with other things. I haven't every actually tried that so i can't speak from experience. Looking at that template, i'm not too sure why you would use blocks there, i would think a gallery would just need a multi-region. Is there a reason you need separate blocks for the date and the image itself? if you just need to add an optional date, add it as another region within the same template as the image and wrap it with a perch:if exists="date" then it will show only if it has data.