problems with menu on stoutcpa site

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

problems with menu on stoutcpa site

Postby kosborn » Thu Jul 19, 2012 8:09 am

Hi

I am having some trouble with http://stoutcpa.free.magicedit.com/

1) The homepage text isn't showing up
2) The edit buttons on the menu (when logged in) are repeating
3) I have created dropdowns from the menu for potential content pages when they want to add them. For Bios & Credentials (& Contact), there is no content yet. I tried to make use of the code where it only shows up for the admin, but doesn't show up on the live site. However, it appears that the links are still showing on the live site
4) For the first drop down off of service offering, I tried to use the edit URL and stick the old Joomla URL in there (probably a bad idea, since it has parameters, but I just wanted to try). Now the page doesn't come up properly.
kosborn
 
Posts: 77
Joined: Wed Sep 14, 2011 2:02 pm

Re: problems with menu on stoutcpa site

Postby raw10 » Thu Jul 19, 2012 9:36 am

Let's take a look...

1. If you look at this code starting at line 23 of index.html, you'll see some mismatched tags:

Code: Select all
<magicedit me_name="homeIntro">
    <br><span>Sandra Stout,<br>Certified Public Accountant, Master of Science in Taxation"<br><em>It is my job to help you pay as little tax as legally possible."</em><br />
</magicedit>


Having imbalanced HTML tags can cause unpredictable results. Try this:

Code: Select all
<magicedit me_name="homeIntro">
  <p>Sandra Stout,<br />Certified Public Accountant, Master of Science in Taxation<br /><em>"It is my job to help you pay as little tax as legally possible."</em></p>
</magicedit>


Make sure the surrounding tags are also balanced.

2. Your CSS was being a bit aggressive, particularly by setting the height of all <a> tags in the nav. We've hardened up the edit buttons a bit so that seems to be resolved. MagicEdit does inject <a> tags in, so sometimes it's best to use me_hidebuttons on menu items and edit those elements elsewhere on the page or site.

3. You are on the right track here. If you want to do cl_visible to check if content in a repeat region has been edited, try using the .hasEdits method. If the MagicRepeat region is on the page, it exists and thus your logical check evaluates to "true" even if the content of the repeat has not been edited. Here's what you want to do (e.g. menu.html, line 23):

Code: Select all
<ul cl_visible="=CLManager.activeAccount:isAdmin||$Menu4.hasEdits">
  <magicrepeat me_name="Menu4" me_repeat="yes">
    <li><a href="about.html"><magicedit me_name="Menu4Link" me_plain>New Link</magicedit></a></li>
  </magicrepeat>
</ul>


Note the use of ".hasEdits" there.

4. This one has me confused. Not sure how you got it in that state, but I deleted the entry and re-added it using the repeat controls....

Hope that helps!
raw10
 
Posts: 81
Joined: Tue Apr 12, 2011 2:46 pm

Re: problems with menu on stoutcpa site

Postby kosborn » Tue Jul 24, 2012 8:39 am

Thanks for the help. I am implementing and testing the changes now. This was an existing site that was previoulsy on Joomla so I take no responsibility for the existing CSS and code :-). I didn't realize the hasEdits so that helps a lot. I will respond more if I have further questions. Thanks
kosborn
 
Posts: 77
Joined: Wed Sep 14, 2011 2:02 pm

Re: problems with menu on stoutcpa site

Postby raw10 » Tue Jul 24, 2012 8:44 am

Sounds good. I also reviewed item 4 (edit URL of a repeat page) and understand what happened now. Theoretically it shouldn't have caused any issues, so we'll take a look at it on our end.
raw10
 
Posts: 81
Joined: Tue Apr 12, 2011 2:46 pm

Re: problems with menu on stoutcpa site

Postby kosborn » Tue Jul 24, 2012 9:16 am

OK, almost there.

The only problem I am having now is that the submenu on services is showing up correct on all pages except the subpages that are automatically made

You can see the submenu on services when here (3 items including tax planning etc.)
http://stoutcpa.free.magicedit.com/services.html

But not when here
http://stoutcpa.free.magicedit.com/about/24

I think it has to do with the relative path used for the menu.html inside header perhaps? But not sure how to fix it.
kosborn
 
Posts: 77
Joined: Wed Sep 14, 2011 2:02 pm

Re: problems with menu on stoutcpa site

Postby raw10 » Tue Jul 24, 2012 9:32 am

You don't want to use me_repeat="yes" here on menu.html, line 13:

Code: Select all
<magicrepeat me_name="Menu3" me_repeat="yes">


This tells MagicEdit to nest a new repeat inside a given repeat instance. You want to use the global version of Menu3, so just change that line to this:

Code: Select all
<magicrepeat me_name="Menu3">


Since MagicRepeats do not nest by default (the default state of me_repeat is "no" on MagicRepeat instances), you will get the behavior that you want.

That said, since you are using MagicRepeat pages you will need to determine which MagicEdit regions will be unique to the page and which will be global. To use the global version, make sure you put me_repeat="no" on those. For example, menu.html, line 11:

Code: Select all
<magicedit me_name="MainMenu3" me_plain>Services Offered</magicedit>


should be

Code: Select all
<magicedit me_name="MainMenu3" me_plain me_repeat="no">Services Offered</magicedit>


That way if the content manager changes "Services Offered" to "Our Services" it will change the global version, and everything will stay in sync. DON'T do this for items that are inside MagicRepeat sections or pages that should remain unique to a particular repeat instance, e.g. the page titles inside the dropdown menus.
raw10
 
Posts: 81
Joined: Tue Apr 12, 2011 2:46 pm

Re: problems with menu on stoutcpa site

Postby kosborn » Tue Jul 24, 2012 8:41 pm

Perfect - thank you!
kosborn
 
Posts: 77
Joined: Wed Sep 14, 2011 2:02 pm


Return to MagicEdit Discusson

Who is online

Users browsing this forum: No registered users and 1 guest

cron