custom express entry list
Permalinkhelp please
I have watched andrews video on making custom theme for express, this works for express details, but what i want is similar to a shopping cart, it should display 3 columns, has a thumb nail of the image or a image 100 or 150px, below are my other details.. name, weight, colour, etc all in a <div> and then shows the next object.
so, i have created /application/blocks/express_entry_list/templates/ and copied the view.php here and called it detailed_list.php

from
<?php defined('C5_EXECUTE') or die("Access Denied."); $c = Page::getCurrentPage(); if ($entity) { $results = $result->getItemListObject()->getResults(); if (count($results)) { $i = 0; foreach($result->getItems() as $item) { $i++; $name = $item->getEntry()->getPartname(); $img = $item->getEntry()->getPartImg(); $img_src = ($img) ? $img->getRelativePath() : ''; $partnum = $item->getEntry()->getPartNum(); $description = $item->getEntry()->getPartDesc(); $partcat = $item->getEntry()->getPartCategory(); ?>
I am using this template to render each entry as it's own tile within a sort and filter interface (see attached screenshot of the results).
For each item, you just need to get the entry attribute. As in my example above, to get an Express entry image attribute that has a handle of "part_img", it would be called like this:
$img = $item->getEntry()->getPartImg();
Notice how part_img becomes PartImg in the above line. Then you'll need to get the src for that image:
$img_src = ($img) ? $img->getRelativePath() : '';
So you'd just need to echo out $img_src.
I hope that helps!
/application/blocks/express_entry_list/templates/detailed_list.php
Is this correct? the path and the name or does'nt the name matter?
thanks
dave
/packages/my_custom_theme/blocks/express_entry_list/templates/custom_template_name.php
Then when you go to select the custom template, "Custom Template Name" should be an option.
That's how I did it on my project.
im using cloneametal theme to play and change the elemental theme.
so, i can use more than 1 place for my custom block template then...
/application/blocks/here
/packages/my_custom_theme/here
For correctness.. what is the correct place?
dave
/packages/cloneamental/blocks/express_entry_list/templates/your_template.php