Posts by procreative

    I have a portfolio page using Categories, it uses a template for the item and a template for the listing. Something is going wrong. What should happen is the category assigned when adding an item in admin, should get added as a class to the div to display that item. Its also not cropping. Below is code.


    Am I using incorrect tags that changed in v3?


    For Item:

    Code
    1. <perch:categories id="media" label="Category" set="media" display-as="checkboxes"><perch:category id="catTitle" /></perch:categories>
    2. <perch:content id="slug" for="title" type="slug" suppress="true" />
    3. <perch:category id="catSlug" for="catTitle" type="slug" suppress="true" />
    4. <perch:content type="text" id="video-link" label="YouTube Link" help="Use For You Tube URLs Only" />
    5. <img src="<perch:content type="image" id="media" label="Image" />" title="<perch:content id="title" type="text" label="Media Title" title="true" />" />


    For Listing (FYI the data-filter javascript reuses the catClass):

    Thats what I have done in the end, took me a while to figure out how to implement it. So I am just translating the Nav name inside Perch now.


    This is what I used:

    <?php perch_pages_navigation(array(

    'from-path' => '/de',

    'levels' => 0,

    'hide_extensions' => true,

    'include-parent' => true,

    'template' => array('menu.html')

    )); ?>

    I have gone the mysite/de route. So I have a sub folder of pages. My navigation is inside a layout, if not I could just use a regular perch:content region.


    Probably will end up with at least German, Spanish and possibly French and Italian.

    Okay so my Region is called 'Menu Translations'. Example below based on yours:

    <?php perch_content_custom('Menu Translations',['filter'=>'id','match'=>'eq','value'=>'shop_menu_de']); ?>


    Does not work. It just makes that menu item empty.


    If I just use <?php perch_content_custom('Menu Translations'); ?> then I get all the fields in that shared region.


    What am I doing wrong?

    So I am trying to build a set of menu translations. I use a layout for my menu. In this example have created a "main.header.de.php" file. Inside this is some html. I am stumped how to include the regions!

    I created a shared region with a range of IDs thats in the admin:


    <perch:content id="home-link-de" type="text" label="Home Link DE" />

    <perch:content id="shop-link-de" type="text" label="Shop Link DE" />

    <perch:content id="news-link-de" type="text" label="News Link DE" />

    <perch:content id="shows-link-de" type="text" label="Shows Link DE" />

    <perch:content id="band-link-de" type="text" label="Band Link DE" />

    <perch:content id="media-link-de" type="text" label="Media Link DE" />

    <perch:content id="bookings-link-de" type="text" label="Bookings Link DE" />


    How do I use these inside a layout?

    I tried both these and neither work, the first shows all the above, close but I only want one ID shown. The second doesnt work at all probably because its a php file rather than a html file as its a layout.

    1. <span class="w-nav-title"><perch:content id="home-link-de" type="text"></span>

    2. <span class="w-nav-title"><?php perch_content_custom('Home Link DE', array('template'=>'menu_links_de.html')); ?</span>

    Is there a way to use menu_links_de.html and pull a specific ID from it only?

    So I found this article: https://docs.grabaperch.com/pe…eate-a-multilingual-site/


    If I choose either route there are issues/questions:


    Separate Sites

    Works better for navigation translation I suppose, however as the site is made and some regions on each page use generic IDs such as page banners, I would have to either go back and change the names (can I do this in admin without having to change the templates?) or have to recreate them on each site!


    Separate Regions
    As I have created the site without adding _en after every region, is this possible? Can I make the default _en regions be the ones without this and then add _de, _es etc? Also using this method how would I change the navigation? Assuming I can only use one navigation layout?

    I have my blog news set to show as brief clips on the footer in my homepage. But despite trying below, they are listed alphabetically by title rather than chronologically.


    How do I force them to list newest first then descending?

    <?php perch_blog_custom(array('count'=>3, 'template'=>'post_homepage.html', 'sort-order' => 'DESC', 'sort-type' => 'numeric')); ?>

    While I understand you can create HTML templates, how do I amend what gets sent in the plain text emails the Forms app generates?

    I want to remove the content they filled on the form on the email they receive, how do I do this?

    Can anyone give me a step by step guide or point me to docs or info on how to do this:


    I have developed a website with Perch, I want to create a Press Area with content only visible to them and download links only they can access. Its called an EPK or Electronic Press Kit.

    What I plan is to email press contacts with a link to this area and a username/password either in the email or built into the link.

    On my main contact form I am using the Forms app, and in the config have a redirection to a success page. To do this with the Mailchimp Form I think the only way I can do this is to submit the same form to both the Forms and Mailchimp apps?


    I have tried the below code and it does not work. It seems only one instance of the form code works, its either one or the other. Any idea how I can achieve this?


    <perch:help><p>Below are the labels that appear by each form field.</p></perch:help>


    <div class="two-thirds">


    <perch:form id="subscribe" app="perch_mailchimp" double-optin="true" />

    <perch:form id="subscribe-confirm" method="post" app="perch_forms" />


    <perch:label for="firstname" class="blocklabel"><perch:content id="firstname" type="text" label="First Name" /></perch:label>

    <perch:input type="text" id="firstname" required="true" mailer="FNAME" class="input_bg" />


    <perch:label for="lastname" class="blocklabel"><perch:content id="lastname" type="text" label="Last Name" /></perch:label>

    <perch:input type="text" id="lastname" required="true" mailer="LNAME" class="input_bg" />


    <perch:label for="email" class="blocklabel"><perch:content id="email" type="text" label="Email Address" /></perch:label>

    <perch:input type="email" id="email" required="true" mailer="email" class="input_bg" />


    <div class="clearfix"></div>

    <div class="submit">

    <perch:input type="submit" id="submit" value="Subscribe" class="contact_submit" />

    <perch:input type="reset" id="reset" value="Reset Form" class="contact_reset" />

    <perch:input type="hidden" value="1" id="confirm" mailer="confirm_subscribe" />

    <perch:input type="hidden" id="list" value="9f7bcc7a5e" mailer="list">

    </div>

    </perch:form>

    </perch:form>


    </div>


    I tried <perch:form id="subscribe" app="perch_mailchimp" double-optin="true" method="post" app="perch_forms" />

    I am trying to have the blog create an image for an article using a default set if one is not specified.


    For example if I have 3 categories of news, Live News, Recording News and General Musings. I want to have a default image used when one is not specified, changing for each category.


    <img src="<perch:if exists="image"><perch:blog id="image" type="image" width="1000" height="400" crop="true" label="Article Image" order="1" help="Image Size 1000px x 400px" /> alt="<perch:blog id="postTitle" label="Article Title" /><perch:else />/assets/images/1000x400-Placeholder.gif</perch:if>" />


    So between that perch:else statement I need some kind of <perch:if categories=live_news />/assets/images/live-news.gif</perch:if> etc


    Can anyone help?

    So I have a site originally built in Perch 2 using the Blog App. I have reused the templates etc for a new site, generally everything works fine except the Blog. Loading the index page for it gets as far as the nav menu, basically I think as soon as it encounters the blog it quits. So previously I renamed Blog to News and maybe this is something to do with it?


    1. Here is code within index page

    2. Also here is htacess stuff:


    <IfModule mod_rewrite.c>

    RewriteEngine on


    AddHandler php-script .xml

    ErrorDocument 404 /


    # you might not need this, i only have this rule to stop redirecting once it has been redirected, stops it from getting stuck in a loop

    RewriteCond %{ENV:REDIRECT_STATUS} 200

    RewriteRule ^ - [L]


    RewriteRule ^news/category/([a-zA-Z0-9-/]+)$ /news/index.php?cat=$1 [L]

    RewriteRule ^news/([a-zA-Z0-9-/]+)$ /news/post.php?s=$1 [L]

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


    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.+)/$ /$1 [R=permanent,QSA]


    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteCond %{REQUEST_FILENAME}.php -f

    RewriteRule ^(.+)$ $1.php [L,QSA]

    </IfModule>


    Having installed new Perch and Blog App and created fresh DB (latest), is there anything else I need to do with the App itself to make it work or is this some other issue?


    Attached is a debug screenshot