Posts by blythdev2k


    I'm looking to add the function so users can add images galleries within the page content.

    I would like the user to setup an image gallery in the gallery app and then be able to type the slug name into a field on a page to display the images.

    For example, I have setup a text field on a page for them to type the name of the slug


    A gallery has been setup called test, so they would add the word test in the above field, which I would like to display as below

    <?php perch_gallery_album_images('test'); ?>

    On the line above, is there any way to to replace test with the value of perch_content('Gallery'); ?

    I haven't been able to find anything that would work.



    Does anyone know it if possible to change the Master Page once a page is already setup.

    When I create a new page you can select the Mater Page from a dropdown of the ones available, but I can't see an option to edit it anywhere.

    I ask as I need to be able to swap between two versions of the homepage, one with an alert popup on it, and one without.



    Has anyone added a file upload to the comment form on the blog app before? I need the person making the comment to submit a file.

    I've tried the below, but with no luck in the comment_form.html file.

    <perch:input id="commentOrganisationleaflet" type="file" label="Annual report PDF" >


    Tthanks for the reply.

    That's what I was hoping for, I have added an image in the Meta and Social thread and the full URL shows up correctly in the source code, but the post on Facebook takes the first image on the page, which is the header image. If I remove that, then it posts the image on the article, but not the one in the Meta and Social tab.


    I'ved used to post the rss feed of the blog onto Facebook, however it doesn't include the article image used.

    It posts the header image of the website template, rather than the article image.

    I tried to add to the RSS feed, so it is as below with the <image> line added.

    Does anyone know how to get this to work, or if i'm doing something wrong?


    1. <item>
    2. <title><perch:blog id="postTitle" /></title>
    3. <link><perch:blog id="domain" /><perch:blog id="postURL" /></link>
    4. <guid><perch:blog id="domain" /><perch:blog id="postURL" /></guid>
    5. <description><![CDATA[<perch:blog id="postDescHTML" encode="false" />]]></description>
    6. <pubDate><perch:blog id="postDateTime" format="D, d M Y H:i:s O" /></pubDate>
    7. <image><perch:blog id="image" type="image" /></image>
    8. </item>

    Sorry for the late reply, I was away from the office yesterday.

    I enabled debugging and it was bringing up that the tables were not found.

    I found the sql file and inserted that manually and it worked.

    The Google API key also needs added to the main index file on the front-end, as it was in the code as…ck=initMap&key=XXXXXXXXXX and didn't pull the api key from the main settings.

    Thank you very much for your time and information, it was a great help.

    The tables haven't been created.

    The front end gives the below error message when searching for an address.

    Warning: array_map(): Expected parameter 2 to be an array, bool given in addons/apps/root_locator/lib/RootLocator_Addresses.class.php on line 400

    Warning: count(): Parameter must be an array or an object that implements Countable in addons/apps/root_locator/lib/RootLocator_Addresses.class.php on line 402

    I'm using Perch3, but the code in the files is showing the below.

    $sql .= '












    FROM perch2_jw_locator_locations loc

    LEFT JOIN perch2_jw_locator_markers mkr ON loc.markerID = mkr.markerID

    LEFT JOIN perch2_jw_locator_failed_jobs err ON loc.locationID = err.locationID


    If I make the database tables, might that work? Starting to get complicated for me. Would I also need to add every row?

    If so, is there a way to find out what db structure needs to be manually entered?

    Thanks for your time.


    Has anyone developed any location search for Perch that anyone knows about?

    I'm looking to setup a store locator type of structure.

    I have a number of locations setup in perch and would like to link it up to Google Places / Maps so someone can enter a place name or postcode and it returns the nearest listing.

    Thanks in advance.


    I'm looking for a bit of help regarding the below if possible?

    I have a simple region setup called Centre Info.

    Inside the region I have a number of ID's such as name, address, postcode, email etc.

    I have all of this information displayed on the left of the page in a div using <?php perch_content('Centre Info'); ?> which is fine.

    However, elsewhere on the page I want to display only the postcode.

    I have tried <?php perch_content_custom('Centre Info', [postcode]); ?> but this is bringing up the below error.

    Warning: Use of undefined constant postcode - assumed 'postcode' (this will throw an Error in a future version of PHP) in ...

    Is there something else I need to do here?

    Thanks in advance.


    I've set my navigation menu so the main menu at the top, then on internal pages I have the section menus on the left.

    The menu has 3 levels Main > Sub Menu > Sub Sub Menu.

    The top menu has all 3 levels Main > Sub Menu > Sub Sub Menu.

    The sidebar menus have 2 levels - Sub Menu > Sub Sub Menu.


    What I have setup is.

    Chirstmas Lights > Christmas Lighting Feature Competion (Subpage)


    Floral Presentations > Garden Competition (Subpage)

    They both show up fine on the sidebar menu, but the top menu will only display the bottom subpage, the one above does not show.

    Even if I reorder Floral Presentations and Chirstmas Lights, Garden Competition disappears from the top and only the bottom one Christmas Lighting Feature Competion shows.


    Has anyone seen annything similar or can point me in the right direction to locate the problem.

    EDIT: They missing ones at the top don't appear to be hidden, there is no reference to them in the source code of the page.


    I have this working now, thanks for the link.

    1. <a <perch:if exists="subitems"> class=" dropdown-toggle nav-link" </perch:if> id="navbarDropdown " role="button" data-toggle="dropdown" aria-haspopup="true" class="nav-link" aria-expanded="false" href="<perch:pages id="pagePath">"><perch:pages id="pageNavText"> </a>


    I wonder if someone could help.

    I have setup perch menus linked to bootstrap styles and i've setup the CSS to make a new colour for each button using childs.

    The one style I can't seem to get to work is for the 'dropdown-toggle' style to only be active on menus with dropdowns, my template either adds them for all (like below, only About Us has any dropdown items, the other 3 don't, but the toggle icon is still there.) or I have to remove it, which means the user doens't know it is a dropdown unless they click / hover over it.


    My item.html code is as below.

    1. </perch:before>
    2. <li class="nav-item dropdown" <perch:if exists="current_page"> </perch:if>
    3. <perch:if exists="ancestor_page"> class="ancestor"</perch:if>>
    4. <a class="nav-link dropdown-toggle " id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="<perch:pages id="pagePath">"><perch:pages id="pageNavText"></a>
    5. <perch:pages id="subitems" encode="false">
    6. </li>
    7. <perch:after>

    If anyone has done this previously, any advice would be appreciated.