Posts by Loudon

    I have created a set of categories named RESOURCES and can output these on the webpage.

    I also have a number of resources each of which have a title, a category and an uploaded PDF file. I can output a list of these on the webpage.

    What I need to do is out put the categories and under each of these list the resources for that category. Can anyone point me in the right direction please?

    The server supports rewriting and I've added a / before the second blog.

    I tried taking out all the rules and still no joy.

    I have the following code in my .htaccess file which is located in the server under public_html

    1. RewriteEngine On
    2. RewriteCond %{REQUEST_FILENAME}.php -f
    3. RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
    4. RewriteRule ^blog/([a-zA-Z0-9-/]+)/preview$ /blog/post.php?s=$1&preview=all [L]
    5. RewriteRule ^blog/([a-zA-Z0-9-/]+)$ blog/post.php?s=$1 [L]

    In addition there is another .htaccess file in the level above public_html which has the following data...

    I have tried with this data deleted but it doesn't seem to make any difference

    Been trying all sorts of variations but still no joy. This is what I have in my .htaccess file...

    1. RewriteEngine On
    2. RewriteCond %{REQUEST_FILENAME}.php -f
    3. RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
    4. RewriteRule ^blog/([a-zA-Z0-9-/]+)/preview$ blog/post.php?s=$1&preview=all [L]
    5. RewriteRule ^blog/([a-zA-Z0-9-/]+)$ blog/post.php?s=$1 [L]

    I am using perch

    I'm afraid not.

    When I click on the view draft button I am taken to ...


    instead of


    If I manually type in domainname/blog/post.php?s=PostTitle&preview=all the draft shows properly

    I am able to preview published posts but not drafts. As per the video tutorial on rewrite rules, I have added the following to my .htacess file.

    1. RewriteRule ^blog/([a-zA-Z0-9-/]+)/preview$ /blog/post.php?s=$1&preview=all [L]
    2. RewriteRule ^/blog/([a-zA-Z0-9-/]+)$ /blog/post.php?s=$1 [L]

    Can anyone suggest how I can fix this please?

    I have set up a page where the client can go into the control panel and upload a number of dates and times for appointments. There is also a checkbox where she can indicate if this date is already booked.

    The page then displays a list of dates in a radio box format. If the date is already booked the radio box is disabled.

    When the user selects a date on the page and submits the form, is there any way this can change the value of the 'booked' checkbox?

    This is the full template

    1. <div class="form-check">
    2. <input
    3. class="form-check-input" style="text-align: left !important; font-weight: 100 !important"
    4. type="radio"
    5. name="flexRadioDefault1"
    6. id="flexRadioDefault1" value="<perch:content id="appttime" type="date" time label="Date/Time" format="d F Y H:i" native>"
    7. />
    8. <label class="form-check-label" for="flexRadioDefault1">
    9. <perch:content id="appttime" type="date" time label="Date/Time" format="d F Y H:i" native></div>

    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.

    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:

    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?