Posts by Hoops78

    Thanks Hussein


    Changing the tags to perch_content_custom() now outputs the content, but if I go back to my original issue of changing the master, it doesn't create the regions.


    Is there a way to create the regions and output the content. Or do I need to get my client to change masters while the tags are perch_content_create() then change them to perch_content_custom() when they want to add content?

    Coming back to this. The client is adding content (which I can see in the admin), but its not showing on the page.


    To re-cap, I'm using these calls for the content;


    PHP
    1. <?php
    2. perch_content_create('CatTitle', array(
    3. 'template' => 'text.html'
    4. ));
    5. ?><img src="https://community.perchcms.com/attachment/188-screenshot-2020-04-16-at-15-47-44-png/?thumbnail=1" class="woltlabAttachment" data-attachment-id="188" id="wcfImgAttachment0">

    And there is content in the region (see attachment).


    But can't work out why the content isn't showing on the page?

    This worked for what I needed. So I changed the Perch calls to;


    Code
    1. perch_content_custom('myRegion', array(
    2. 'template' => 'my_template.html',
    3. ));

    and removed the copy from Master bit in the Master settings.


    Thanks for your help.

    Ah, that could be a way around it. Currently, I'm using the method of;


    <?php perch_content('CatTitle'); ?>


    Then setting the regions to copy from another master.


    Instead, if I change the regions on the new master to this method;


    Code
    1. perch_content_custom('myRegion', array(
    2. 'template' => 'my_template.html',
    3. ));

    that should enable me to achieve the results I'm after?

    OK. I didn’t know if the new regions should be assigned as per the new master rather than being NEW.


    If this is not the case, do you think deleting the page and re-adding with the new master would be the best way?

    Hi


    In Runway if I change a page to have a different master, should it assign the regions that the master is set to? Or have I done something wrong as the new regions are coming in as new.


    Should I delete the page and re-add it with the desired master to avoid this?


    Kind Regards

    Wayne

    Hi


    Regular Perch


    I'm not sure if I've missed a setting, but when I create a subpage and check the location url in the location tab, the page is sitting in the root of the website rather than in the subfolder. This then gives the incorrect url for the template path.


    Here are some screenshots of the page settings;


    This is the parent page;



    and this is the child page;



    Which results in a path of;


    PHP
    1. <?php include(str_replace('/', DIRECTORY_SEPARATOR, 'perch/templates/pages/service_landing_page.php')); ?>

    Rather than


    PHP
    1. <?php include(str_replace('/', DIRECTORY_SEPARATOR, '../perch/templates/pages/service_landing_page.php')); ?>

    I've tried adding the /specialist-sensors/ manually in the location tab with move to this location ticked. Which moves the file, but doesn't update the template url.


    It's a site I did a few years back and if I add a subpage to a page I originally did it works as expected, so didn't know if I'd missed a step when setting up the new pages?


    Regards

    Wayne

    Hi Jordin


    Thank you for the reply.


    I'm not that clever to write a php script for this... plus there's only 6 entries, so doesn't warrant me doing additional work. I was just fishing for either a no or a quick solution ;)

    Hi


    I think I know the answer to this, but thought I would check.


    A client is using Perch forms I have done for a questionnaire with around 30 questions (requiring long answers). Last week their email stopped working, so they've had to use the csv option. As there is so many columns and long answers the csv download, they've asked if the content can be re-submitted to send as an email, so they can print it.


    I've got a feeling no... but said I would ask the question.


    Regards

    Wayne