User Tools

Site Tools


Sidebar

startup_tutorial_and_checklist:design_configuration:smarty_template_code_extensions:page_specific_content

Inserting Page Specific Content

There are already several feature specific templates within the software that you can directly place content into and they would only appear within those features. But there may be times when you have a page template in use across several pages and may only want specific text to appear in specific pages within the system but don't want to create a page template for each page with a little custom content. You can do this using smarty within a page template. The following smarty will allow you to place some specific content on specific pages. Note that we placed most pages in that loop. You can remove options in that loop to show only choices for the pages you want to affect.

{if not $smarty.get.a}
<!-- content for the front page -->
{elseif $smarty.get.a eq 1 or $smarty.get.a eq "cart"}
<!-- content for listing placement process -->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 1}
<!-- content for anything in client side admin tool show my current listings page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 2}
<!-- content for anything in client side admin tool show my expired listings page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 3}
<!-- content for anything in client side admin tool show my current info page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 4}
<!-- content for anything in client side admin tool edit my current info page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 6}
<!-- content for anything in client side admin tool remove current listing page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 7}
<!-- content for anything in client side admin tool communication configuration page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 8}
<!-- content for anything in client side admin tool communications viewing page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 9}
<!-- content for anything in client side admin tool show my listing filters page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 10}
<!-- content for anything in client side admin tool show my favorite listings page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 12}
<!-- content for anything in client side admin tool show my sign edit/display pages-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 13}
<!-- content for anything in client side admin tool show my flyer edit/display page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 18}
<!-- content for anything in client side admin tool balance transactions display page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 19}
<!-- content for anything in client side admin tool black listed buyers edit/display page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 20}
<!-- content for anything in client side admin tool invited buyers edit/display page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 21}
<!-- content for anything in client side admin tool my current bids display page-->
{elseif $smarty.get.a eq 4 and $smarty.get.b eq 22}
<!-- content for anything in client side admin tool feedback management page-->
{elseif $smarty.get.a eq 5}
<!-- content for category browsing -->
{elseif $smarty.get.a eq 6}
<!-- content for sellers other listings page -->
{elseif $smarty.get.a eq 11 and $smarty.get.d eq 4}
<!-- content for newest listings browsing feature within last 24 hours -->
{elseif $smarty.get.a eq 11 and $smarty.get.d eq 1}
<!-- content for newest listings browsing feature within last 1 week -->
{elseif $smarty.get.a eq 11 and $smarty.get.d eq 2}
<!-- content for newest listings browsing feature within last 2 weeks -->
{elseif $smarty.get.a eq 11 and $smarty.get.d eq 3}
<!-- content for newest listings browsing feature within last 3 weeks-->
{elseif $smarty.get.a eq 12}
<!-- content for notify friend -->
{elseif $smarty.get.a eq 13}
<!-- content for contact seller -->
{elseif $smarty.get.a eq 14}
<!-- content for print friendly display -->
{elseif $smarty.get.a eq 19}
<!-- content for search and search results -->
{elseif $smarty.get.a eq 28 and $smarty.get.b eq 135}
<!-- content for features -->
{elseif $smarty.get.a eq 28 and $smarty.get.b eq 136}
<!-- content for contact us -->
{elseif $smarty.get.a eq 28 and $smarty.get.b eq 137}
<!-- content for how it works -->
{elseif $smarty.get.a eq 28 and $smarty.get.b eq 140}
<!-- content for terms and conditions -->
{elseif $smarty.get.a eq 28 and $smarty.get.b eq 141}
<!-- content for help  -->
{elseif $smarty.get.a eq 28 and $smarty.get.b eq 142}
<!-- content for about us -->
{elseif $smarty.get.a eq 28 and $smarty.get.b eq 143}
<!-- content for pricing  -->
{elseif $smarty.get.a eq 28 and $smarty.get.b eq 144}
<!-- content for advertise  -->
{elseif $smarty.get.a eq 28 and $smarty.get.b eq 145}
<!-- content for privacy policy  -->
{elseif $smarty.get.a eq 'ap' and $smarty.get.addon eq 'storefront' and $smarty.get.page eq 'list_stores' }
<!-- content for list stores page-->
{elseif $smarty.get.a eq 2}
<!-- content for listing details page -->
{elseif $smarty.get.a eq "tag"}
<!-- content for browse tags page -->
{elseif $smarty.server.SCRIPT_NAME eq "/register.php"} 
<!-- content for the registration section -->
{else}
<!-- content for page not specifically listed -->
{/if}

And to focus on one page something like these:

{if $smarty.get.a eq 4 and $smarty.get.b eq 1}
<!-- content for anything in client side admin tool show my current listings page-->
{/if}

{if $smarty.get.a eq 5}
<!-- content for category browsing -->
{/if}

or to display something on all pages BUT the one page mentioned:

{if $smarty.get.a neq 4 and $smarty.get.b neq 1}
<!-- content for anything in client side admin tool show my current listings page-->
{/if}

{if $smarty.get.a neq 5}
<!-- content for category browsing -->
{/if}
startup_tutorial_and_checklist/design_configuration/smarty_template_code_extensions/page_specific_content.txt · Last modified: 2015/02/18 19:48 by geojames