I have a Drupal 6.14 site with visual modules. I have a view and on the primary link I place a link for the scene.
There is a way to hide links in the primary menu, if the view is empty?
You may either preprocess_page (THEMENAME_preprocess_page (& amp; $ vars)) or MODULENAME_preprocess_page ( & Amp; $ vars), but the above Mac is right that those scenes are not empty or not, as long as they do not move, so a performance hit will occur. Within the
function, you should have access to the structured primary link array, so you can run this view:
$ view = views_get_view ('view_name'); // Swap 'default' for a different display as is necessary, besides $ args logic, and if not applicable then it can be left. $ Output = $ view- & gt; Preview ('Default', $ Args); If there is no result of {// view (empty ($ view- & gt; result)), change the primary link here to remove the link in question}
No comments:
Post a Comment