Page 1 of 1

ListIt2 WYSIWYG [solved]

Posted: Tue May 07, 2013 11:30 am
by gionda
Hello,
I created a field type "Text area" but does not work with WYSIWYG, in prewiev see the html code. What can it be?
Thanks

Re: ListIt2 WYSIWYG

Posted: Tue May 07, 2013 8:58 pm
by Dr.CSS
Did you set it to use wysiwyg..?

Re: ListIt2 WYSIWYG

Posted: Wed May 08, 2013 8:51 am
by gionda
yes, in the field definition...

Re: ListIt2 WYSIWYG

Posted: Wed May 08, 2013 6:00 pm
by Dr.CSS
Do you have wysiwyg in page edit..?

Re: ListIt2 WYSIWYG

Posted: Wed May 08, 2013 6:30 pm
by gionda
yes, the WYSIWYG is active, in fact in the page edit i can see the text in the right way (formatted), but when i go on the website it appear with html code.

Re: ListIt2 WYSIWYG

Posted: Wed May 08, 2013 6:35 pm
by Dr.CSS
I didn't realize that it was in front end, must be something on the tag/call for the text box that strips the eval, what does it look like in the template..?

Re: ListIt2 WYSIWYG

Posted: Wed May 08, 2013 6:46 pm
by gionda
this is the template

Code: Select all

<div id="books_menu">{ListIt2books action="search"}{ListIt2books action="category"}</div>
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage}&nbsp;{$prevpage}
{/if}
{foreach from=$pagelinks item=page}
    {$page->link}
{/foreach}
{if $pagenumber < $pagecount}
&nbsp;{$nextpage}&nbsp;{$lastpage}
{/if}
</p>
{/if}

{foreach from=$items item=item}
<div class="item">
<h3 class="item-title">{$item->title|cms_escape}</h3>

{if !empty($item->fielddefs)}
    <div class="item-properties">
    {foreach from=$item->fielddefs item=fielddef}
        {if $fielddef.type == 'upload_file' || $fielddef.type == 'select_file'}
            {$fielddef.name|cms_escape}: <a href="{$uploads_url}/{$fielddef.value|cms_escape}">{$fielddef.value|cms_escape}</a><br 
        {else}

{$fielddef.value|cms_escape}<br />
        
{* capture image *}
{capture assign='thumb'}{$item->fielddefs.image.dir}/{$item->fielddefs.image.value}{/capture}

{/if}
    {/foreach}
    </div>
{/if}

</div><!-- item -->
{/foreach}

Re: ListIt2 WYSIWYG

Posted: Wed May 08, 2013 7:02 pm
by uniqu3
It is because of |cms_escape, remove that and if you are going to use some smarty (like cms_selflink or so) in WYSIWYG area then you should also use eval {eval var=$fielddef.value}

Re: [SOLVED]ListIt2 WYSIWYG

Posted: Wed May 08, 2013 7:50 pm
by gionda
Thank you, now it works! :)