Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to remove specific engine page and engine menu item from refinerycms menu?
    primarykey
    data
    text
    <p>I've created an engine in refinerycms where i'm pulling the data onto the homepage. Refinerycms automatically creates a page and a menu item for this engine. </p> <p>How can i delete the engine page as well as remove it from my menu bar?</p> <p>menu.html.erb</p> <pre><code>&lt;% # Collect the root items. # ::Refinery::Menu is smart enough to remember all of the items in the original collection. if (roots = local_assigns[:roots] || (collection ||= refinery_menu_pages).roots).present? dom_id ||= 'menu' css = [(css || 'menu clearfix')].flatten.join(' ') hide_children = Refinery::Core.menu_hide_children if hide_children.nil? -%&gt; &lt;div id="nav"&gt; &lt;ul&gt; &lt;%= render :partial =&gt; '/refinery/menu_branch', :collection =&gt; roots, :locals =&gt; { :hide_children =&gt; hide_children, :sibling_count =&gt; (roots.length - 1), :menu_levels =&gt; local_assigns[:menu_levels], :apply_css =&gt; true #if you don't care about class='first' class='last' or class='selected' set apply_css to false for speed. } -%&gt; &lt;/ul&gt; &lt;/div&gt; &lt;% end -%&gt; </code></pre> <p>menu_branch.html.erb</p> <pre><code>&lt;% if !!local_assigns[:apply_css] and (classes = menu_branch_css(local_assigns)).any? css = "class='#{classes.join(' ')}'".html_safe end -%&gt; &lt;li&lt;%= ['', css].compact.join(' ').gsub(/\ *$/, '').html_safe %&gt;&gt; &lt;%= link_to(menu_branch.title, refinery.url_for(menu_branch.url)) -%&gt; &lt;% if ( (children = menu_branch.children unless hide_children).present? &amp;&amp; (!local_assigns[:menu_levels] || menu_branch.ancestors.length &lt; local_assigns[:menu_levels]) ) -%&gt; &lt;ul class='clearfix'&gt; &lt;%= render :partial =&gt; '/refinery/menu_branch', :collection =&gt; children, :locals =&gt; { :apply_css =&gt; local_assigns[:apply_css], :hide_children =&gt; !!hide_children, :menu_levels =&gt; local_assigns[:menu_levels] } -%&gt; &lt;/ul&gt; &lt;% end -%&gt; &lt;/li&gt; </code></pre> <p>The menu item in particular that i want removed from the menu bar is "new programs"</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload