Posts by Loudon

    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?

    I have a site where the editor can create pages.

    At the top of each of these pages is a pricelist and this is edited using a shared region.

    It is displayed on each page using a template with the code below.


    Further down each of the pages, I want to populate a call to a shopping cart with the same sizes and prices from the pricelist shared region. Can anyone advise me on the best way to do this? I have tried perch_content_custom but failed.

    I have set up the ability for a client to create pages. Each of these pages are generated from a master page. The master page, and therefore the generated pages allow the client to enter a page heading, a folder name, and a password. The idea is to use this password to password protect the page. Normally I do this by using a php include to a php page which has a password protect function that asks for a password before users can view the page. Totally flummuxed as to how to get this to work with Perch as the password protect page has to be able to pick up the password for that particular page.

    Sorry, I realised my question wasn't worded very well. What I am hoping to do is add a link on the dashboard rather than to the dashboard. This link takes users to another page outwith Perch. I followed theseinstructions and it seemed to work in that a link was inserted in the footer judging by the source code. This sounds really daft but I can't see the link when I view the dashboard.