Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
LDDG Posted May 4, 2016 Posted May 4, 2016 Hello all, I am currently using IP.Content (Pages) to display a list of records from a database using the 2 Column Image Feature template. I am trying to figure out how to always make the second record being displayed to be a Google Ad. I have already created a new template called entryGoogleAd. That template will be called when the second record should be displayed. Here is the code that currently displays all records using the entry template: <section class='ipsType_normal ipsSpacer_both'> {{if count($articles)}} {{foreach $articles as $id => $record}} {{if $id % 2 == 0}} <div class='ipsGrid ipsGrid_collapsePhone'> {{endif}} {template="entry" app="cms" location="database" group="category_2_column_image_feature" params="$record, $database, $id"} {{if $id % 2 == 1}} </div> {{endif}} {{endforeach}} {{endif}} </section> My gut feeling is that somewhere in the code above, the code {template="entryGoogleAd" app="cms" location="database" group="category_2_column_image_feature" params="$record, $database, $id"} would need to be added. How can I edite the code so that it uses entryGoogleAd on the second record being displayed? Thanks in advance!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.