I've created a plugin for a client that has two methods, the first of which is called from within the home template:

{exp:kapitex:get_products_carousel products="111, 113, 38"}

... which creates a carousel based on 3 entries, one of Google's structured data types, which you'll see if you visit the website, view source, and do a search for: "ItemList".

while the second should create a breadcrumb element, and is placed in the products template:

{exp:kapitex:get_products_breadcrumb product="{entry_id}"}

During testing, the {entry_id} sent the correct value, as did sending a raw value (which is to be expected). However, because I'm having problems with the ".htaccess" file with the local development machine, I wasn't able to test the method within the products template, and instead had to use the home template.

We've published the plugin on the client website and the get_products_breadcrumb appears not to get called.

I replaced the code with:

public function get_products_breadcrumb () {
    echo "XXXXXXXX";

... cleared the caches and still nothing, so it's not the code in the method.

Any ideas what I've done wrong?

1 Answer 1


Have you tried return "XXXXXXX"; Instead of "echo"?

  • When I tried echo before it spat out at the top of the page. However, I gave return a go and it made no difference. Aug 9, 2017 at 12:15
  • echo will always add content to your page at the point at which the echo occurs. It won't inject that content into your template.
    – Henry
    Oct 17, 2017 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.