EditWrx Knowledge Base Home
 Search       Login   Register   Members   Help   Home 
Search by username

EditWrx Knowledge Base > Open End User Forum > Block Editing > Nesting Editblocks, Includeblocks, and Excludeblocks

Nesting Editblocks, Includeblocks, and Excludeblocks
 Moderated by: Keith  
 New Topic   Reply   Print 
AuthorPost
Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 583
 Posted: Sat Dec 10th, 2005 04:11 pm
 Quote  Reply 
Editblocks refer to content on the page's file. Includeblocks refer to content on an included SSI/PHP/ASP file. Therefore, you can not nest an Editblock inside of an Includeblock or nest an Includeblock inside of an Editblock.

An Excludeblock turns off editing inside the block and preserves the original block's syntax in the page's file. If you have an SSI, PHP, or ASP include that you do not want EditWrx to edit, place the include syntax inside of an Excludeblock, like so:

<span excludeblock="one">
<!--#include virtual="/include.txt" -->
</span><!-- excludeblock="one" -->

An Excludeblock may be placed inside of an Editblock if you want to exclude part of an Editblock from editability. Likewise, an Excludeblock can be placed inside of an Includeblock to exclude that part of an Includeblock from editability.

As of 6.10.051210 you can also place an Editblock inside of an Excludeblock if the Excludeblock does not contain an SSI/PHP/ASP include. This allows you to make a large section of a page non-editable with an editable section inside of it.

You can not place an Editblock inside of an Excludeblock if the Excludeblock is excluding an SSI/PHP/ASP include because the Excludeblock value can not contain the path to it's nested include.

As of 6.10.051210 you can place an Includeblock inside of an Excludeblock. If the Excludeblock is excluding an SSI/PHP/ASP include, that include will not be editable or changed, but the nested include will be editable and changed. For example:

<span excludeblock="one">
<!--#include virtual="/include.shtml" -->
</span><!-- excludeblock="one" -->

would keep the include /include.shtml from being editable or changed. But, suppose you include a nested include, inside of an Includeblock, on include.shtml, like so:

before content
<span includeblock="/include.inc">
<!--#include virtual="/include.inc" -->
</span>
after content

In the browser the contents of /include.inc will be included inside the content of /include.shtml, and that content will be editable even though the surrounding content of /include.shtml will not be editable. When changes are saved the file /include.shtml will not be effected, but the file /include.inc will be overwritten with the content from the browser.

 

_Steve_
Member
 

Joined: Wed Nov 16th, 2005
Location:  
Posts: 13
 Posted: Thu Jan 12th, 2006 07:27 pm
 Quote  Reply 
Hi Keith,

Thank you so much for your quick response and update for the virtual and file includes!! Works perfect!

OK, I have read the above post about 1000 times and have tried numerous combinations of nested tags but haven't quite figured out how to do what I am trying to do... which is really nothing fancy.

It seems that when using the includeblock the whole included file is available for editing**. I have tried to nest an editblock inside an excludeblock both within the included file and have tried it with an excludeblock wrapped around the actual SSI file include statement in the file that actually calls the included file.

So far I have been unable to get just the editblock section of an included file to be the ONLY editable portion of the page.

Any suggestions?

Thanks!!
Steve

 

** Edit - Actually this is not entirely true - it doesn't have the colored box around it but it does allow you to select, for instance, a table tag and delete it or alter it. And that table tag is not inside an editblock.

Last edited on Thu Jan 12th, 2006 07:39 pm by _Steve_

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 583
 Posted: Fri Jan 13th, 2006 03:58 pm
 Quote  Reply 
Steve

As you found out, you can not place an editblock inside of an includeblock - they are mutually exclusive.

But, you can protect part of the include file from being written to. By default all content on an includeblock is already editable so adding an editblock just confuses things. Instead, just surround the area you want NOT editable on the include file with an excludeblock, like so on the include file:

content on include to edit
<span excludeblock="one">
content on include to not edit
</span><!-- excludeblock="one" -->
more content on include to edit

As you also discovered, the excludeblock is not a solid barrier to editing. It is possible to make changes to a control element (such as a table) inside of an excludeblock. However, any changes made like this in the browser inside of an excludeblock will not be saved.

_Steve_
Member
 

Joined: Wed Nov 16th, 2005
Location:  
Posts: 13
 Posted: Fri Jan 13th, 2006 04:19 pm
 Quote  Reply 
I guess ultimately it would be nice if the included file could follow the same rules for editblocks as a page that is not an include.

Last edited on Fri Jan 13th, 2006 04:59 pm by Keith

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 583
 Posted: Fri Jan 13th, 2006 05:05 pm
 Quote  Reply 
Believe me -  I've tried!! It just can't be done. I agree, it would be nice.

_Steve_
Member
 

Joined: Wed Nov 16th, 2005
Location:  
Posts: 13
 Posted: Tue Feb 28th, 2006 09:09 pm
 Quote  Reply 
Hi Keith,

Can you just delete this whole post? I mistakenly posted it here instead of the more appropriate category.

http://www.editwrx.com/forums/forum12/98.html

Thanks,

Steve

Last edited on Tue Feb 28th, 2006 09:18 pm by _Steve_


 Current time is 05:41 pm




Powered by WowBB 1.62 - Copyright © 2003-2004 Aycan Gulez