Posts by Loudon

    I have a list of dates on a page and I want to filter out all past dates so that only future dates will show.


    I have the following code but cannot see why it doesn't work.

    Thank you for your reply.

    The function isn't crucial but it is mainly for the client rather than the customer.

    On reflection it may be best to move the form from the template to the product page which is php and send from there.

    I have a template which allows a category to be chosen for a product in the control panel.

    Code
    1. <perch:categories id="shopcategories" label="SELECT ONE OR MORE CATEGORY" set="shop-categories" required display-as="checkboxes">

    The template also displays a product image and a buy now button.

    I want to feed the chosen category into the buy now button code but can't work out how to do this.


    The section of code in the buy now button is:

    Code
    1. <input type="hidden" name="product[]" value=" CHOSEN CATEGORY WOULD GO HERE ">

    Can anyone suggest how I can do this in the html template please?

    In the control panel I have a region and the title of all the items in that region are listed on one page. Is it possible, in this listing, to have another column showing the product number and if so, how would I do this please?

    Thank you. This did indeed allow me to change the Blog title.


    Quote

    Another option is to change the itemTitle in the database in the perch3_menu_items table.

    This gave me an idea on how to also change the word 'Blog' on the dashboard homepage blog listing to 'News' by going to

    Code
    1. addons/app/perch_blog/dashboard.php

    and changing...

    Code
    1. $title = $HTML->wrap('h2', $Lang->get(‘Blog’));

    to...

    Code
    1. $title  = $HTML->wrap('h2', $Lang->get(‘News’));

    I was also able to change the tab name on the blog post list by changing the blog_title
    in perch3_blogs table from Blog to News

    Is it possible for the title tag in post.php to be created by the editor in the control panel so that each blog post details page has a unique title tag?

    Can someone tell me how I can exclude categories of blog posts using perch_blog_custom() ?

    At present I have the code below but want to exlude any post with the category of 'resources'.

    Code
    1. perch_blog_custom(array(
    2. 'template' => 'blog/post_in_list2.html',
    3. 'sort' => 'postDateTime',
    4. 'sort-order' => 'DESC',
    5. 'start' => 1,
    6. 'count' => 6,
    7. 'paginate' => true,
    8. ));
    9. ?>

    I have a region called Wedding Dates where my client who is a photographer can enter dates that are already booked. Multiple entries are enabled.


    The id of the items is booked_date


    I want to store these in an array on a php page and then search this array to see if a particular date is contained in it.


    I can output the dates to the page and they output in the format yyyy-mm-dd


    When I search through the array, I can't seem to get a match. This is the code I am using. Can anyone tell me where I am going wrong please?

    Code
    1. $bookeddates = perch_content_custom('Wedding Dates', array('skip-template'=>true,))
    2. if (in_array('2019-12-04', $bookeddates, true))
    3. {
    4. echo "Match found";
    5. }
    6. else
    7. {
    8. echo "Match not found";
    9. }

    I want to display a list on a page for a client which has a name, a download and a view file link.

    The client will enter a name of the file in the control panel and upload the PDF file.


    How do I display the same file path in both the download and view link?


    This is the template code...

    I have a website page which has a region which allows the use to input details of a service.

    The template is booking-form.html and in this there is a content input for a deposit for the service.

    Code
    1. <perch:content id="price" type="text" label="Price of booking fee..">

    Further down the website page there is a form which is sent to a shopping cart. I want to pass a variable into this form with the value of the deposit but I can't seem to get this to work. Can anyone advise?