Hey there,
When I display the output of a view as a page, I cannot see the contextual link for that view, but if I display the output of that view as a block, I can, indeed, see the contextual link for the view (the "edit view" link in the gear). If I set Bartik as the default theme, I can also see the contextual link in the view displayed as page.
Im working on a subtheme, with basically everything from the subtheme's original template.php turned off (as it is, all commented). Although if i set mothership as the default theme, I get the same result.
Bug, feature or am I doing something wrong?
Thanx in advance.
Comments
Comment #1
jessepinho commentedAs far as I understand, contextual links can only be attached to blocks (including the "Main page content" block). I don't believe contextual links can be attached to an embedded view.
Comment #2
betovargWhat do you mean by embedded view?
Comment #3
betovargI see what you mean, i though you meant embedded as in the tpl.php.
What I see is that, in Garland and Bartik, i can actually see the contextual link to edit the view. I dont know if it is something in that theme in particular...
Comment #4
jessepinho commentedMake sure you haven't disabled the block wrapper div in Mothership (I believe it's disabled by default) as that causes problems w/ contextual links as well.
Comment #5
serjas commentedMake sure
<?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>in your page.tpl.php
Comment #6
betovargIts weird because I can see the links markup in the inspector, but I cannot see the controls to edit the view, when the view is displayed as a page. I can use the controls in blocks, it is only in the view as a page.
Can you guys see those controls in a view displayed as a page, when mothership is on?
Comment #7
serjas commented@betovarg , Another weird reason is presence of any wrapper div to your $content . Remove any div for $content
<div WITH SOME CLASS/ID><?php print render($page['content']); ?></div>instead use
print render($page['content']);onlyComment #8
quotientix commentedIn theme settings "Remove .view" needs to be unchecked - that should work to see the settings-wheel on the views again.
Comment #9
jamesharv commentedFor me the contextual links were missing for 2 reasons:
The title should be rendered as follows, and the
$classesvariable should be printed in a class attribute for an element which wraps the title. Eg.Comment #10
betovarg@jamesharv: thank you for your observation. I managed to fix the issue adding the $classes variable into my
<div class="page <?php print $classes; ?>">@serjas You're right, that seems to be the case, in conjunction with the absence of the $classes variable.
Basically, #7 and #9 fixed this for me. My concern is that the page.tpl.php from the original mothership, comes without the $classes variable. This should be fixed because it is very annoying.
Thanx! When I get several issues I have with mothership I will submit my subtheme and let you all know.
In the meantime, here is a patch
Comment #11
mortendk commentedan alternative fix added to the dev version today - its a rewrite of the javascript file & do not need to add a view class
this also fix the general issue around contextual links that dosnt work ;)
Comment #12
mortendk commentedComment #13
mortendk commented