• dwcandy

    (@dwcandy)


    I have the list template selected as default. I have also activated the “image” template in the templates gallery, and there are certain instances where I would like to use the image template rather than the “list” template, but I still want list to be my default.

    Is there a php code that can be used as an override of the default template?

    Specifically, I’m looking at the ASIN codes such as these:
    <?php do_action( ‘aal_action_output’, array( ‘asin’ => ‘B016ZNRC0Q, B00ZV9PXP2’ ) ); ?>

    <?php echo apply_filters( ‘aal_filter_output’, ”, array( ‘asin’ => ‘B016ZNRC0Q, B00ZV9PXP2’ ) ); ?>

    Is there a way to select to use the “image” template instead of my default “list” template?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author miunosoft

    (@miunosoft)

    Hi,

    You can use the template_id argument. The template ID looking like a path can be found on the Templates page (Dashboard -> Auto Amazon Links -> Templates).

    Hope this helps!

    Thread Starter dwcandy

    (@dwcandy)

    Thank you for responding. I looked on the template gallery page and there was not an “id” number per se. Is it just the word like “image” or “list”

    For the example given above, would the following be a valid ways to run the argument?

    [amazon_auto_links asin=”B016ZNRC0Q, B00ZV9PXP2″ template_id=”image”]

    <?php do_action( ‘aal_action_output’, array( ‘asin’ => ‘B016ZNRC0Q, B00ZV9PXP2’, ‘template_id’ => ‘image’) ); ?>

    <?php echo apply_filters( ‘aal_filter_output’, ”, array( ‘asin’ => ‘B016ZNRC0Q, B00ZV9PXP2’, ‘template_id’ => ‘image’) ); ?>

    I tried these versions, but they did not seem to work. They just return the default “list” template rather than the image template.

    What would be the correct structure to select the “image” template?

    Plugin Author miunosoft

    (@miunosoft)

    A template ID looks like a path shown under the template name in the template table on the Templates page. ID and name are different. If you want to pass a template name, you can use the template argument. But be aware that when same template names exist, the first found one will be used. So it is recommended to use the template ID.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Select template other than default’ is closed to new replies.