EE 1.6.8 Build: 20100121
PHP Version 5.2.11
I want to display code snippets (sometimes EE and PHP) in my entries that are not highlighted using the syntax highlighter. I tried doing this:
<pre><code>{exp:weblog:entries weblog="forms" limit="1" disable="categories|category_fields|member_data|pagination|trackbacks"}
{exp:freeform:form form_name="{url_title}" form_id="{url_title}" template="{form_template}" notify="{form_notify}" return="{form_return}" required="{form_field search:required='y' backspace='1'}{field}|{/form_field}"}
<h1>{title}</h1>
<ol class="forms">
{form_field}
<li>
{if "{label}"}
<label for="{field}">{if "{required}" == "y"}<em class="required">*</em>{/if}{label}</label>
{/if}
{if "{type}" == "Text Input"}
<input type="text" name="{field}" id="{field}" >
{if:elseif "{type}" == "Textarea"}
<textarea name="{field}" id="{field}"></textarea>
{if:elseif "{type}" == "Checkbox"}
<input type="checkbox" class="checkbox" name="{field}" id="{field}" >
{if:elseif "{type}" == "Select" || "{type}" == "Multi-select" && "{options}"}
<select name="{field}{if "{type}" == "Multi-select"}[]{/if}" id="{field}"{if "{type}" == "Multi-select"} multiple="multiple" size="4"{/if}>
<?php $items = explode("|", '{options}'); ?>
<?php foreach ($items as $item) { ?>
<option value="<?php echo $item; ?>"><?php echo $item; ?></option>
<?php } ?>
</select>
{if:elseif "{type}" == "Radio Group" && "{options}"}
<ul class="group">
<?php $items = explode("|", '{options}'); $count = 1; ?>
<?php foreach ($items as $item) { ?>
<li><input type="radio" class="radio" name="{field}" id="{field}<?php echo $count; ?>" value="<?php echo $item; ?>" >
<label for="{field}<?php echo $count; ?>"><?php echo $item; ?></label></li>
<?php $count++; ?>
<?php } ?>
</ul>
{if:elseif "{type}" == "Checkbox Group" && "{options}"}
<ul class="group">
<?php $items = explode("|", '{options}'); $count = 1; ?>
<?php foreach ($items as $item) { ?>
<li><input type="checkbox" class="checkbox" name="{field}[]" id="{field}<?php echo $count; ?>" value="<?php echo $item; ?>" >
<label for="{field}<?php echo $count; ?>"><?php echo $item; ?></label></li>
<?php $count++; ?>
<?php } ?>
</ul>
{/if}
</li>
{/form_field}
<li class="buttons"><input type="submit" name="submit" value="submit" ></li>
</ol>
{/exp:freeform:form}
{/exp:weblog:entries}</code></pre>Since by default EE tags and PHP tags are not processed, I figured that would work fine. But, it ends up displaying this:
<pre><code>{exp:weblog:entries weblog="forms" limit="1" disable="categories|category_fields|member_data|pagination|trackbacks"}
{exp:freeform:form form_name="{url_title}" form_id="{url_title}" template="{form_template}" notify="{form_notify}" return="{form_return}" required="{form_field search:required='y' backspace='1'}{field}|{/form_field}"}
<h1>{title}</h1>
<ol class="forms">
{form_field}
<li>
</li>
{/form_field}
<li class="buttons"><input type="submit" name="submit" value="submit" ></li>
</ol>
{/exp:freeform:form}
{/exp:weblog:entries}</code></pre>So I guess it is processing the conditional tag? Anyone have a suggestion? Again, I do not want to use the syntax highlighting and do not want to process this code, just display it. Thanks in advance.