Seiya Posted November 13, 2011 Share Posted November 13, 2011 Hi, My header.tpl is getting filled up with dozens of conditional statements to print the correct meta description for a specific page e.g. {if $pagetitle eq 'Announcements'} <meta name="Description" content="News and announcements concerning our service."/> {/if} Is there a cleaner way to include these descriptions? Ideally I'd like them within the page templates but since the're in the <head> that doesn't seem possible. How have you done it? 0 Quote Link to comment Share on other sites More sharing options...
Tech N Byte Posted October 25, 2017 Share Posted October 25, 2017 I tried this in my header.tpl ... Then i tried <meta name="description" content="{if $filename eq "web-hosting"}Reliable Web Hosting Service{/if}" /> It worked. But my question is that what to do for writing description for other pages? Writing the same code again? If it works, won't it harm my pagespeed? 0 Quote Link to comment Share on other sites More sharing options...
Tech N Byte Posted October 25, 2017 Share Posted October 25, 2017 I tried this in my header.tpl and nothing happened ... Then i tried <meta name="description" content="{if $filename eq "web-hosting"}Reliable Web Hosting Service{/if}" /> It worked. But my question is that what to do for writing description for other pages? Writing the same code again? If it works, won't it harm my pagespeed? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.