Posts by tonyastley

    When performing an admin search Runway is correctly identifying the page with matched content, but the link doesn't contain the page ID?


    .../core/apps/content/edit/?id=/_blocks/blocks.html&itm=Page%20Content


    It seems to be something to do with blocks?


    Does anyone have a fix for this?

    Better image / media management.

    Wordpress for all its troubles does a decent job of media management (global file replacement, alt tags etc).


    Development of Back End Blocks

    Blocks are great, but can tend to break if pushed too far. Reusable blocks would be great - it can be achieved with runway collections and relationships but a standard feature would be very powerful.


    Modern Image Support

    Ability to generate modern web formats (obviously this might require server support).


    Pre Built Starter Shops
    I nearly switched career after building a Perch shop.

    Digging around there are a few values that are checked in the system but not listed in permissions eg:

    Code
    1. content.collections.create
    2. content.collections.manage
    3. content.collections.delete

    Looks like the collections permissions are unfinished.

    Works great. I've used your example/technique for adding and removing block level styles.


    I used it in combination with this link on Clives blog:


    https://github.com/montlewis/perch-redactor-default


    This really helped me get redactor where I needed it allowing insertion of precoded blocks, giving the user a link list (although not collection items), a clear explanation of how to get your own styles into the editor.


    Looking at the syntax within the config.js file I would never have worked it out for myself.


    Take this section for example:


    All working great though thanks.

    I'm struggling to get the id of a form to be unique based on the page it is used on. The template renders but when the form is submitted I get a fatal error.


    The ID needs to be different as the responses need to be saved in separate lists based on the page.


    The opening tag to the form looks like:

    Code
    1. <perch:form id="<perch:forms id="formID" />" method="post" app="mbk_forms">

    Note: the error occurs whether or not its running through perch_forms or mbk_forms.


    The form renders OK on the page:

    Code
    1.  <form id="form1_tester" action="/landing-page-3" method="post">

    However when submitted I get:

    Code
    1. Fatal error: Uncaught Error: Call to a member function label() on null in /path/to-site/perch/addons/apps/perch_forms/runtime.php:27 Stack trace: #0 /path/to-site/perch/core/lib/Perch.class.php(134): perch_forms_form_handler(Object(PerchAPI_SubmittedForm)) #1 /path/to-site/perch/core/inc/forms.php(9): Perch->dispatch_form('tester:perch_fo...', Array, Array) #2 /path/to-site/perch/core/inc/forms.php(23): perch_find_posted_forms() #3 /path/to-site/perch/core/lib/Perch.class.php(235): {closure}(Object(PerchSystemEvent)) #4 /path/to-site/perch/core/runway/start.php(36): Perch->event('page.loaded') #5 /Users/tonyastley/Documents/Websites/SpeechWrite/2021-website/site- in /path/to-site/perch/addons/apps/perch_forms/runtime.php on line 27


    Can anyone help or suggest a different method to dynamically separate form responses?

    I require assistance in adding extra formatting options into redactor. A while back I successfully installed the inline perch assets plugin, but cannot fathom where the settings need to go to add extra formatting options and other plugins into redactor.



    The buttons hide, add and add before work OK.


    Where would I start for adding formatting?

    Yeah, tried that and it does not unfortunately.


    There is further odd unexpected behaviour:


    If the category is changed to a brand new name, the call show now articles.

    If the category is changed back to a name previously used the call works without having to resave.


    Perch showall shows the category id is still correct and does not change.


    It's almost like there is a cache somewhere that isn't being updated.

    I have a set of news items and I'm using categories assigned to them. Changing the category name breaks the link to the articles when showing the collection based on category.


    I'm creating links to the categories at the foot of each article, the linking is dynamic and works from the catPath.

    Code
    1. <a href="/resources/news/categories/<perch:category id="catPath">"><perch:category id="catTitle"></a>

    When updating the category, say changing it's name - the category link on the article is updated fine both the path and title, when clicked the following page shows the correct category information however the previously associated articles don't show.


    Code
    1. perch_collection('News Articles', [
    2. 'category' => $newsCategory,
    3. 'template' => '_news/news_list.html',
    4. ]);


    The only way to get them to show again is to open and re-save each article - obviously I can't expect the client to do this.


    Am I missing something?

    Fixed the issue, the whitespace in the template was the problem.


    Changing this:


    Code
    1. <perch:related id="relatedNews" collection="News Articles" label="Featured News Article" max="1">
    2. <perch:content id="_id"/>
    3. </perch:related>


    to this:


    Code
    1. <perch:related id="relatedNews" collection="News Articles" label="Featured News Article" max="1"><perch:content id="_id"/></perch:related>


    Fixed the issue.

    I have perch collection created to manage news. The user has the ability to select a featured news article:


    Code
    1. <perch:related id="relatedNews" collection="News Articles" label="Featured News Article" max="1"></perch:related>

    I'm obtaining the id of the selected article ok:


    Code
    1. <perch:related id="relatedNews" collection="News Articles" label="Featured News Article" max="1">
    2. <perch:content id="_id"/>
    3. </perch:related>

    However trying to filter against this isn't working, I'm getting no results:


    Code
    1. perch_collection('News Articles', [
    2. 'template'=>'_news/news_list.html',
    3. 'filter' => '_id',
    4. 'match' => 'eq',
    5. 'value' => $featureArticle
    6. ]);

    Can anyone shed any light on why this my be?

    Found the issue it has to be the full slug of the category including parent.


    PHP
    1. <?php
    2. $category = perch_get('category');
    3. perch_collection('Hardware', [
    4. 'template'=>'_hardware/hardware_cameo.html',
    5. 'category'=> 'hardware-categories/'.$category,
    6. ]);
    7. ?>

    I've created a collection in runway to hold products. The products will be shown in various categories and I'm trying to filter the collection on the category but it's not yielding any results:


    Code
    1. perch_collection('Hardware', [
    2. 'template'=>'_hardware/hardware_cameo.html',
    3. 'category' => perch_get('category'),
    4. ]);


    The 'category' is obtained from the slug and is working when showing the info for that category, just not for the collection.


    Any ideas how to get this working?