![]() |
Add emphasis to category heading in smarty
Hello,
Just looking for some guidance on how to add in some em tags within smarty In my template is the following code: Code:
{if $page_title} What I would like to do, is detect whether the title is more than one word, and if it is wrap the subsquent words in em tags, so I can style them different. So for example this is what i want to achieve: HTML Code:
<h1>New <em>Arrivals</em></h1> I tried to write some code using the same syntax as the rest of the smarty template, like so: Code:
{if $page_title} However this actually doesn't work, so I was wondering if it is possible to do what I want and if so how would I do that?? Many Thanks!!! Christine |
Re: Add emphasis to category heading in smarty
You can use this method which acts similar to a split:
Code:
{ assign var=pageTitleArray value=" "|explode:$page_title } |
All times are GMT -8. The time now is 01:18 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.