This is actually in reference to an old post located at http://forum.cmsmadesimple.org/index.ph ... 044.0.html
I know this is an old topic, but my question is directly related to it. If someone were to want to do both of the following:
1. Display html code without rendering it
and
2. Display that with a certain style (look and feel)
One would probably leap to the assumption that one should combine both the tags and the {literal} tags, wouldn't one? like this:
{literal}{/literal}
Unfortunately, my tests seem to show that this won't work. If I wrap the tags around the {literal} tags, then the literal tags seem to no longer function. In other words, my html code displays with the correct style (based on the code tags I used), but they are not ignored, and therefore the code is rendered, rather than displayed.
Am I making sense?
How does one both display html code without rendering it (as using the literal tags would do) AND display it with a special style (such as the code tags would do)? It appears as though only one or the other can happen, but not both.
Am I just missing something? Or is it just not possible?
[solved] Using both Literal and Code tags at the same time...
-
- New Member
- Posts: 3
- Joined: Sat Mar 22, 2008 6:15 pm
[solved] Using both Literal and Code tags at the same time...
Last edited by webchicklet on Fri Apr 11, 2008 8:17 pm, edited 1 time in total.
Re: Using both Literal and Code tags at the same time...
I don't understand why you would want the {literal} tags.
Nullig
Nullig
-
- New Member
- Posts: 3
- Joined: Sat Mar 22, 2008 6:15 pm
Re: Using both Literal and Code tags at the same time...
Because I want to display some code (without processing it). For example, let's say I wanted to show someone how to bold some test in HTML. I would want them to be able to see the code (as if I were escaping the brackets). I don't want the code to actually process. I just want them to see it:
but i also want that to have a special style (stand out and look different than the rest of the text).
UPDATE: I now realize that putting literal tags around html does nothing. The html is still processed. /sigh...
So, now I need to know how to display html without processing and with special formatting. Not sure it's possible.
Maybe I'm looking for the wrong thing. I need to escape the left and right angle brackets, really. I could do it manually I suppose, but that would be a bear.
Code: Select all
<b>bold text</b>
UPDATE: I now realize that putting literal tags around html does nothing. The html is still processed. /sigh...
So, now I need to know how to display html without processing and with special formatting. Not sure it's possible.
Maybe I'm looking for the wrong thing. I need to escape the left and right angle brackets, really. I could do it manually I suppose, but that would be a bear.
Last edited by webchicklet on Fri Apr 11, 2008 7:49 pm, edited 1 time in total.
-
- New Member
- Posts: 3
- Joined: Sat Mar 22, 2008 6:15 pm
[SOLVED] Re: Using both Literal and Code tags at the same time...
I've managed to answer this one for myself.
To display, but not process the html code, wrap the code in tags.
Then just add a style for xmp to the css.
Done.
To display, but not process the html code, wrap the code in tags.
Then just add a style for xmp to the css.
Done.
