Posts by JordinB

    you should be able to do something like:

    Code
    1. <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" /><perch:else />/assets/images/<perch:categories id="[category name]" set="[set name here]" ><perch:category id="catSlug" /></perch:categories>.gif</perch:if>" alt="" />


    Here we use the image if it exists on the blog, otherwise we use a gif from /assets/images that has the same name as the category slug.

    For your product list concern, again you can either use the full shop which will definately work to list the products in a "catalog" layout. Since you're in control of your design with Perch, you can decide if the product page has the traditional "add to cart" controls. This can be an excellent solution if the client "may" in the future want to eventually open up to e-comm. The down side is that you need to setup some default shop configuration like tax rules etc just to use it. Also the product edit page will still contain all the fields required for the perch shop, and this may not all be relvant to the catalog layout. (think quantity, tax etc)


    If ecom is completely out of the picture, you can create the category structure in Categories and use a Collection to store the products. This way you have full control on the product template and the editing experience will be much simpler in the CMS.


    I'd present both options to the client with the pros and cons and let them decide.

    Two methods for a multi-lingual site, either create a branched method where the site splits off from en / fr a the top and duplicates the pages between each language, OR multi-region method where you grab the language from the URL param in the runway routes: [en|fr:lang] and then append the language to the content regions so in the CMS you'll see 2 regions for each input on the page.


    Which way to do it really depends on your client, do they expect to have identical content in both en and fr ? if so the multi-region can work well as they edit both en and fr content for the same page in one place not having to navigate to the alternate language page. Some clients have a "stronger" or primary language which has more in-depth content than the secondary language, in this case i'd recommend the branched site method.


    I've used both, and it really does depend on the client.

    Sometimes the same collection items might need to be ordered differently depending on the context they are being used. It would be nice to be able to use the drag and drop item ordering on more than the default context.


    What I mean is i may have a collection of fabrics. And they are categoriezed by "Design: Plains, Patterns", they are also categoried by "Color Groups : blue, brown, yellow ...". Since we can't seem to order by a collection categorization, it would be cool if we could instead defined a new ordering context. Then i could order the items differently for a page that wants to display the fabrics ordered by the color group category vs a page that needs to display the fabrics ordered by the design category.


    I could see this implemented with a small header above the reordering items to manage the contexts: select box to change current context, add button to create a new context, delete to remove etc. If you change the context, the items refresh with the ordering of that context. And you can't delete the default context.

    you said you're in a docker env ? you probably access the site specifying to port in the address ? if so you'll need to add that to the license validation

    So i've tried, but i don't see any difference from what I was previously doing. The assets import and are assocated to the collection items. I still don't see anything in the resource_log table to suggest that they won't be deleted though.


    Is there some sort of indexing or another funciton that needs to be called maybe ?

    yeah from what i've seen its in the resource_log table, the resrouces are cleaned up if they don't have an entry, but importing resources for my collection item didn't add any resource log even though it assocated the resource with the collection item.

    Hi,

    I've built a data importer app to import collection items with images.


    My issue is that in the collection template, the image field has multiple cropped versions:

    Code
    1. <perch:content id="image" type="image" bucket="fabrics" crop width="900" height="600" label="Image" />
    2. <perch:content id="image" type="image" bucket="fabrics" crop width="190" height="126" />

    And now the cropped images have magically dissapeared while the original image and the thumb@2x version still exists.


    The importer follows the following steps:

    1. user uploads zip file with images, and system extracts zip and imports each file saving the data result to associate with the collection items.

    2. user uploads csv file with collection item data and importer matches collection item with previously uploaded image via filename.

    3. importer uses the new assetID with the CollectionbImporter and Template to insert or update the data.


    In perch i see the collection items and images fine. Then all of a sudden it looks like perch doesn't recognize that the cropped images are assocated with any content so it cleans them.

    At least locally i have phpStorms LocalHistory function to restore but i cant publish to the server until this is figured out.


    Has anyone had an issue like this where the cropped images imported dissapear ?


    Thanks.

    Hard to say. I too have setup a local site to use the database remotely, but that does t seem to be the issue here. It sound more of a permissions issue.


    Maybe if you could elaborate a little more on how you have the site setup, which server you’re using etc. Folder/file permissions. We might be able to narrow it down a bit.