Author Topic: How to , links in txt?  (Read 1954 times)

0 Members and 1 Guest are viewing this topic.

artzie

  • Guest
How to , links in txt?
on: Fri, 27. September 2002 - 15:54:02
How to convert
 to <br> or <p>? While trying vlibTemplate, I get all text in "one line", no linebrake's anymore... I also need a way to make small heading's in text.

Heading 1
Some text... Some text...
Some text... Some text... Some text...

Some text... Some text...
Some text... Some text...

Heading 2
Some text... Some text...
Some text...
Some text... Some text...


How to make link's in my txt active, so that You can click it and open it same/new window? Like in this Forum...
Code: [Select]
urlwww.fi/url
or like...[/i]

releasedj

  • Guest
How to , links in txt?
Reply #1 on: Fri, 27. September 2002 - 16:53:38
vlibTemplate isn't HTML specific. If you use vlibTemplate for an html page, you must consider that it creates source code. Therefore if you have a string with
 in it, it will show up in the source code, but HTML doesn't translate to the screen unless it's ine <pre> tags.

If you need to show your newline in an HTML document, then you should do the folowing:

Code: [Select]
$tmpl-setVar'yourvarname', nl2br$yourvar;

and in your template, you should make sure that you have escaping turned off otherwise it will print the <br>'s, ie:

Code: [Select]
tmpl_var name=yourvarname escape=none

I hope this helps, for the other stuff like and [url], this isn't the kind of thing supported by vlibTemplate, it's application specific (nothing to do with a template).

Regards,

Kelvin