In the image you can see the name of the region "Main Menu" is displayed above the menu which is a block provided by nice menus v 6.x-1.3. The block is being added through a site wide context. The code which is adding the region name is:
<a class='context-block-region' id='context-block-region-<?php print $region ?>'><?php print $region_description ?></a>
From line 2 of context-block-editable-region.tpl.php
The only place I found this theme function called was in function execute($region) of context_reaction_block.inc
Is this supposed to be used for inline context editing? I'm not finding this feature. For now I don't know how to get rid of the region name and I need to.
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | Screen shot 2010-11-17 at 11.11.49 AM.png | 15.52 KB | jethro |
| Screen shot 2010-11-16 at 5.34.22 PM.png | 43.04 KB | jethro |
Comments
Comment #1
nevets commentedIf you are displaying the menu using it's block, it has a title by default. Configure the block and set the title to
<none>Comment #2
jethro commentedThanks for the response.
It is not the block title. It's the name of the region as stated above. In the attached image the region name shows up even if there are no blocks in it. It only appears for logged in users.
It is from the code above having to do with editable regions.
Normally this is hidden with css.
a.context-block-region {
display:none;
}
But my menu's css was overriding it. It took a little while to figure this out, and I thought something more complicated was happening.
Comment #4
rjbrown99 commentedThis is still an issue, happening with me as well. In my case, I have a global context displaying the secondary links block in the footer region. I see the word "footer", which looks like this:
My secondary links block has for the title. It's not the title, it's the region that is showing up. Same as the original poster, only happens for authenticated users.
Comment #5
rjbrown99 commentedDoh, it is a CSS fix - I have an override. So if you see this, check CSS via firebug :)
Comment #6
jorditr commentedSame effect on one site I'm developing. Is this a feature? Marking an element with an "a" and doesn't link to anywhere?? And not hidding it? An easter egg? It took me a while to discover. It looks sad. Please I think we all should try to make html code that validates...
Comment #7
meramo commentedSubscribing. A very weird effect, in fact. Context 6.x-3.0
Comment #8
Anonymous (not verified) commentedwhat is the function of this link??
can we delete it?
Comment #9
TimG1 commented+1 to removing this or being able to turn it off. I'm not sure how to use it or what it's for.
In my case I'm using jquery cycle to cycle through a couple of blocks assigned to a region via context. Works great when not logged in. But once logged in, the extra A element throws the JS off. How do I remove this A tag? Is there a hook somewhere that I can use?
Thanks for reading,
-Tim
Comment #10
sperks commentedI am having the same issue as Tim. By looking at the css you can see that this is intended as a display for empty regions, but I can't for the life of me find where this might be useful in the current version of context. Perhaps it's left over from a previous version?
Comment #11
lobo235 commentedI agree that just hiding this with CSS is not a decent solution. I think the ultimate solution to this problem should be that the link doesn't show up in the markup at all unless the user has a permission that allows them to create/edit contexts.
Comment #12
angelusnoctis commentedI get the same issue, I do really need a solution as my site is going to be used by many registered users.
The strange thing is that I only get the
<a>tag in the header, but not in other regions. I'm placing my "Primary links" menu, inside the Garland Theme<div id="header-region">.I discovered that if I remove the
id="header-region", the tag disappears, but I have no idea why, and where can I fix this to maintain the original code of the theme.Comment #13
angelusnoctis commentedI get a little step fordward: look for this code in your css:
And replace with this:
I still have no idea why does this happens, but commenting that line makes it disappear.
Any cleverer ideas?
Comment #14
puff3pass2 commentedI hate crappy Drupal modules but I dont mind helping you poor guys and gals. Try this>>
Edit this crappy module using this >>>>> vi modules/contrib/context/theme/context-block-editable-region.tpl.php
Remove this line from this crappy piece of code>>>>
class='context-block-region' id='context-block-region-< print $region >'>
(I removed the php tags and other tags so you can read. Just remove the whole line)
VIOLA!!!!! Problem fixed and this crappy module will pooo on you no more. Its unfathomable why that line was in there in the first place. Again, I hate stinky coders and module developers. Maybe one day they will fix their buggy code and make Drupal better. I call these types of fixes Stupid Drupal Tricks. Have fun! ;-)
Comment #15
nevets commentedNot the best approach to solving problems, better to work with the module developers for a proper fix.
Comment #16
flokosiol commentedInstead of hacking the code inside the module, copy the original .tpl-file from "sites/all/modules/context/theme/context-block-editable-region.tpl.php" into your theme folder, eg. to "sites/all/themes/your_theme/templates/context/context-block-editable-region.tpl.php".
Now remove the link in line 2:
<a class='context-block-region' id='context-block-region-<?php print $region ?>'><?php print $region_description ?></a>Don't forget to clear the cache to see your template file in action.
Comment #17
ashooner commentedHacking your template to correct a module bug isn't really ideal either. We just need to know from the devs why this code is being rendered, so we know how to submit a patch to correct it. I don't want to remove it if there is a reason (although it looks like its just markup pollution to me).
Comment #18
dminkovsky commentedI'd like to report that this exact problem is occurring here too, but with D 7.9 and Context-3.0-beta2. Should I copy this ticket?
Comment #19
dminkovsky commentedI've identified the issue for me, and it's not with the Context module. Indeed, my issue was identical to #2 (Posted by jethro on November 17, 2010 at 1:32pm). I had CSS overriding the module's CSS.
Comment #20
davidcalhoun commentedI'm still having issues with this. Was this ever looked at by the developer? Is there a way to remove this anchor tag without editing the module's core?
Comment #21
paulocsI could not reproduce using the 7.x-3.x-dev version. If you still have this problem using the last dev version, please reopen the issue.
Probably the problem here is that the context CSS is override.
Closing this issue as context 6.x is no longer supported.
Comment #22
paulocsComment #23
paulocs