Deleting initial magicedit tags [Solved]

Discussion about MagicEdit features, modules, applications, and HowTos.

Deleting initial magicedit tags [Solved]

Postby guiding » Tue Jan 15, 2013 6:55 pm

@raw10

Code: Select all
<magicrepeat me_repeat="yes" me_name="main_content_heading_1_block">
   <h1><magicedit me_plain me_name="main_content_title">Block Title</magicedit></h1>
   <magicrepeat me_repeat="yes" me_name="main_content_heading_1">
      <h3><magicedit me_plain>Heading title or paragraph</magicedit></h3>
   </magicrepeat>
   <magicrepeat me_repeat="yes" me_name="main_content_paragraph_1">
      <p><magicedit me_plain>Paragraph one</magicedit></p>
   </magicrepeat>
</magicrepeat>


Regarding the above code is it possible to delete the initial magicedit tags? I can delete cloned magicedit tags, but not the initial.

For example, referring to the code above, in one clone I need "Heading title or paragraph" and "Paragraph one" to appear. In other clone I only need "Paragraph one" but not "Heading title or paragraph". I would like to delete the initial "Heading title or paragraph". Unfortunately the delete button doesn't actually delete the initial "Heading title or paragraph", it only deletes its clones. I thought maybe I could work around this by replacing the text with an empty space but this doesn't work either.

So is there any way to delete the initial magicedit tags? What I'm looking for is a little more flexibility with MagicEdit. From my client's point of view I'd like give them the ability to create a container that has a variety of headings, subheadings, lists, tables and paragraphs and then let to decide what to keep and remove. Does this make sense?

The live example is available here.
http://guiding.free.magicedit.com/fitnessprograms.shtml

Hopefully you have my login credentials to see the problem.
Last edited by guiding on Wed Jan 16, 2013 11:21 am, edited 1 time in total.
guiding
 
Posts: 17
Joined: Tue Jan 15, 2013 1:45 pm

Re: Deleting initial magicedit tags

Postby raw10 » Wed Jan 16, 2013 10:31 am

We usually provide a series of optional elements that show up only if they are edited or the user is logged in as an administrator. For more information on how to do that, visit this link:

http://www.magicedit.com/ShowingandHidingStuf.cl

If you have any questions about the particulars, just let us know and we can help with implementation. This functionality supports all sorts of use cases, including not showing pages until ready to be published, providing optional sections, images, image galleries, form elements, placeholder text, etc.
raw10
 
Posts: 81
Joined: Tue Apr 12, 2011 2:46 pm

Re: Deleting initial magicedit tags

Postby guiding » Wed Jan 16, 2013 11:21 am

Thank you raw10.

I found a solution! I removed all the nested magicedit and magicrepeat tags and just wrapped a magicedit tag around the entire code block. It just dawned on me that MagicEdit's default editor is a very nice HTML editor.

So instead of something like this...
Code: Select all
<magicrepeat me_repeat="yes" me_name="main_content_block">
   <h1><magicedit me_plain me_name="main_content_title">Block Title</magicedit></h1>
   <magicrepeat me_repeat="yes" me_name="main_content_heading_1">
      <h3><magicedit me_plain>Heading title or paragraph</magicedit></h3>
   </magicrepeat>
   <magicrepeat me_repeat="yes" me_name="main_content_paragraph_1">
      <p><magicedit me_plain>Paragraph one</magicedit></p>
   </magicrepeat>
</magicrepeat>


I went with this...
Code: Select all
<magicrepeat me_repeat="yes" me_name="main_content_block">
   <magicedit>
      <h1>Block Title</h1>
      <h3>Heading title or paragraph</h3>
      <p>Paragraph one</p>
   </magicedit>
</magicrepeat>


The client can then decide what they want to keep and delete through the MagicEdit HTML editor.
Last edited by guiding on Wed Jan 16, 2013 12:56 pm, edited 2 times in total.
guiding
 
Posts: 17
Joined: Tue Jan 15, 2013 1:45 pm

Re: Deleting initial magicedit tags [Solved]

Postby raw10 » Wed Jan 16, 2013 11:52 am

Great. Simple solutions are often the best!
raw10
 
Posts: 81
Joined: Tue Apr 12, 2011 2:46 pm


Return to MagicEdit Discusson

Who is online

Users browsing this forum: No registered users and 2 guests

cron