Jump to content

Formatting text within smarty block


Recommended Posts

All I need is to include a bit of html inside a bock of smarty {if} {/if} code, and I can't figure it out. No matter what I try it alternates between a blank page and displaying the tags literally.


All I want is to have part of it wrapped in < strong > and then part of it preceeded by a < br / > (spaces added to both to prevent parsing)


{if $productinfo.pid != ""}-add strong here--{$productinfo.name} --end it here and include line return -- {$productinfo.description}{/if} 


Is that possible?

Link to comment
Share on other sites

Here I go again, answering my own...:D

I simply broke the {if} blocks into 2 separate ones, and wrapped the first in the tags I wanted.

Too easy.

[b]{if $productinfo.pid != ""}You chose the {$productinfo.name}{/if}[/b]

{if $productinfo.pid != ""}{$productinfo.description}{/if}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated