Page 1 of 1

[Solved] Second Content Tag not displaying editable area

Posted: Thu Dec 27, 2012 9:21 pm
by baldguy
Upgraded to 1.11.4

In my template I have the following code:

Code: Select all

{content assign=maincontent label="Main Content"}
{content block='second_block' assign=sidebar label='Sidebar'}
	{if $sidebar}
		<div id="sidebar">
			{$sidebar}
		</div>
		<div id="content_2col">
			{$maincontent}
		</div>			
	{else}
		<div id="content_1col">
			{$maincontent}
		</div>
	{/if}
When I go to add a new page, I am presented with the primary content area (labeled "Main Content"), and a space where the second content area should be. It is labeled correctly, "Sidebar", and there is a blank space where the textarea/editor should be, but no way to enter information.

Firebugging it shows the textarea is there with visibility:hidden, at the element level.

I also tried adding wysiwyg='true' to the second content block, but that didn't help.

I'm using TinyMCE as the default editor in the site.

I've tried clearing the browser cache and the site cache. Still nothing.

What did I miss that would prevent this from displaying?

Thanks.

Re: Second Content Tag not displaying editable area

Posted: Thu Dec 27, 2012 11:07 pm
by calguy1000
Just tested this... with this content in a brand new template:

Code: Select all

{process_pagedata}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>{sitename} - {title}</title>
{metadata}
{cms_stylesheet}
</head>
</__body>

<!-- start header -->
<div id="header">
  <h1>{sitename}</h1>
</div>
<!-- end header -->

<!-- start menu -->
<div id="menu">
  {menu}
</div>
<!-- end menu -->

<!-- start content -->
<div id="content">
  <h1>{title}</h1>
{content assign=maincontent label="Main Content"}
{content block='second_block' assign=sidebar label='Sidebar'}
   {if $sidebar}
      <div id="sidebar">
         {$sidebar}
      </div>
      <div id="content_2col">
         {$maincontent}
      </div>         
   {else}
      <div id="content_1col">
         {$maincontent}
      </div>
   {/if}
</div>
<!-- end content -->

<__body>
</__html>
No issues here, so therefore you will need to do some more digging.

Re: Second Content Tag not displaying editable area

Posted: Thu Dec 27, 2012 11:18 pm
by baldguy
Well, apparently it's something else that's gone wrong, as I copy/pasted your template into a new template on my site, and I'm still not getting the sidebar textarea/editor.

Thanks for the help.

Re: Second Content Tag not displaying editable area

Posted: Fri Dec 28, 2012 3:16 pm
by baldguy
Found it.

In my TinyMCE configuration, I had the following in the Advanced->Extra Configuration box:

Code: Select all

extended_valid_elements : "iframe[marginheight|id|frameborder|scrolling|align|marginwidth|name|id|src|height|width|]"
in an attempt to get the editor to render iframes for embedded video.

Removing that caused the second editor box to display.

Edit: Must have been a typo - probably the last pipe after width - because adding the code from this comment http://forum.cmsmadesimple.org/viewtopi ... 79#p289179 works fine, and keeps the iframe.