4 users online. Create an account or sign in to join them.Users
Forcing extension to top of nav group in array
This is an open discussion with 2 replies, filed under General.
Search
The docs for fetchNavigation say:
... The indexes for these groups [Blueprints and Sections] are 100 and 200 respectively...
So if you set a lower index you can force your items to appear before these.
In the Dashboard extension I used the ExtensionsAddToNavigation delegate and I set the dashboard navigation group at the beginning of the array (-1):
https://github.com/nickdunn/dashboard/blob/master/extension.driver.php#L74-86
Thanks Nick, How come I missed the Fetch nav in docs.. must've been a late one! Cheers for info.
EDIT
With this method is it then possible to allow sections to appear in the same nav group?
It just creates a new nav group using the method you have outlined. I guess I'm trying to combine an extension and sections into 1 nav group called content.
Create an account or sign in to comment.
Hi folks,
Wondering if there is a method to force my extension page that i've created to always appear above all other sections I create in a Nav Group?
I have added an Extension called Static Pages to a Nav group called content and I will add stuff like blog, gallery and case studies into this array view the creation of relevant sections.
Is there a means to force my extension to the top of the list in the Nav Group at all?
Thanks
EDIT
I have this code to place my extension page in the nav so is there a means to force it to '0' or something?
public function fetchNavigation() { return array( array( 'location' => __('Content'), 'name' => __('Static Pages'), 'link' => '/manage/' ) ); }