Wagtail menu: add or move items - django

I'm creating website with Wagtail and i'd like to understand menu wagtail-way. I found solutions with templatetags or with menu-items. This is simple and working. But Wagtail solves if i need to add some item (link to external site, link to webpage with filters aso...) and how menu can be rearanged? I'm tried to search Wagtail "doc", but it keeps talking just about admin menu and for simple menu there nothing more than few simple hints about parent and children of the Page.
Thanks for any advice or link to doc.

You are correct that Wagtail itself does not include menu management features. If modifying templates to manipulate menus is not an adequate solution (e.g. site editors will need to modify the menu in the future), you will have to either create your own custom logic or use an external library like https://github.com/rkhleics/wagtailmenus.

Related

Wagtail page promote tab - "Show in Menu" - How does it work?

The default Wagtail page model includes the "Show in Menu" option on the promote tab. I've been searching through the documentation for awhile now trying to find more information about how this works and I don't see anything.
What is this option used for, and how do I hook into that field so that I can build a simple list of links to be used is some arbitrary template like a footer?
Am I supposed to just build my own queryset of page models and then filter on that value, or is there a simpler utility include with Wagtail that I can use directly?
This is a generic field that is available on Page models that does not do anything by default.
https://docs.wagtail.org/en/stable/reference/pages/model_reference.html?highlight=show_in_menua#wagtail.core.models.Page.show_in_menus
While the documentation is not the clearest, the only thing this impacts is whether the page is returned in in_menu() querysets.
https://docs.wagtail.org/en/stable/reference/pages/queryset_reference.html#wagtail.core.query.PageQuerySet.in_menu
As Wagtail does not make assumptions about what your frontend (front facing pages) will look like it is up to you to determine what this field means for your application.
Additional links
https://wagtailmenus.readthedocs.io/en/stable/ - a package for building complex menus within Wagtail
https://www.accordbox.com/blog/how-to-create-and-manage-menus-in-wagtail/ - good tutorial on building custom Wagtail menus
The Wagtail Getting Started section could use some information about how to use 'show in menu' to create menus. Until that gets added, try this tutorial for how to use this 'from scratch': https://www.accordbox.com/blog/how-to-create-and-manage-menus-in-wagtail/
Or install wagtailmenus per instructions in this tutorial: https://engineertodeveloper.com/wagtail-site-navigation/
(At work we built ours by hand but if we were doing it over, I would definitely look into wagtailmenus)

How to create a static About us page in opencart

I am a beginner in using opencart.I need to create an About us page from admin and have to link it to my main menu navigation.How to get this?
Step 1 : Goto information link in catalog tab
Step 2 : click to insert a page or information page like about us
Step 3 : if you have enabled seo then you can write keyword for you aboutus page or information page then your url will be easy to use e.g below if seo is disbaled then your url will be little boring e.g(index.php?route=information/information&information_id=4)or simpler to it which will not be good to share or use
NOTE: for seo you should use .htaccess file
It very simple go to admin panel
catalog -> Information
here you can see all the static pages such as About us,Delivery Information etc
edit them and changes will appear on front page .
to insert new page
catalog -> Information -> Insert
most complex opencart themes have a module like menu that you almost always can edit in the backend, if you wish to you can add it manually, to do so locate header.tpl in catalog->view->theme->common and see if menu is called directly there probably in a section or in an external file, probably located in the same folder, if you wish to you can send me a message with further info and i would be glad to further assist you, its really simple, if you find your way around.

Joomla 2.5 pagination settings from administrator

I am beginner to joomla, currently using version 2.5. I have came across a problem with pagination. In my site pagination on all the pages were working well, but suddenly, I don't see any pagination for any page. I don't realized, what setting from admin panel I have changed. I have checked the settings from the Article Manger->options->Shared Options, but all are ok.
Is there any other settings in admin panel to show pagination?
Any help appreciated.
Thanks.
You must seach this in Article Manger->options->"First Tab"
But it can be also placed in the main menu item: Menu->MainMenu->"First item" general settings...
I have realize the problem, when I put <jdoc:include type="module" name="cblogin" /> in my template file, then all the pagination links get disappeared. I have also checked with putting below code -
jimport('joomla.application.module.helper');
$mods = JModuleHelper::getModules('cblogin');
echo JModuleHelper::renderModule($mods[0]);
but, nothing has changed. Is there any other solution to load module into html code?
If you want to add modules to articles, one way is to add a custom position to the article then assign the module to that position. In the article editor add this code
[loadposition myNewPosition]
Then you can assign any module to myNewPosition on the position option. Make sure the module is assigned to all pages.

Adding Link to Admin Menu Programatically (OpenCart)

I'm currently developing a module for a friend and need to add a link into the admin flyout menus. I'd prefer not for him to have to edit the files, but so far that's the easiest way I've seen to insert these links (hardcoded into the admin header, that is).
The modules work so well that I can't believe there's no easy way to add in an admin link as such. I could always add it into the module settings page, but that seems to defy the purpose of the module settings.
Any help is appreciated.
The simplest way is to edit all the necessary files, thus controller admin/controller/common/header.php - add the name of the link and the action of the link, language file admin/language/<THE_LANGUAGE(S)>/common/header.php - add the entry name, the template admin/view/template/common/header.tpl - add the menu link entry where applicable.
Little harder way is to do the same via vQmod extension...
Can you not just have a script that appends your <li> to <ul id="menu"> when the page is loaded?

How can I make Joomla 1.5 menus?

I'm making my own Joomla template, but when I check menu manager, it seems to be very confusing, because there are a lot of choices. I just need simple menu linking to my sites pages. So I need to know:
1) What kind of tag I need to insert to my template, so that it can show menus.
2) How can I link to pages on my site with that menu manager.
So, here's the five minute whirlwind tour of Joomla: You have Components, Modules, and Plugins.
Menu items link to components. This means that components are effectively "pages" in Joomla. So, you want a page to list a bunch of articles, for example? Create a menu item, and when you're asked to set it's "type" pick one the "articles" entries. Boom; you've just linked to a component.
Now, modules are odd bits and pieces of code that sit around components. Remember, the component is the "page" for all intents and purposes; modules are sidebar elements, "Related Articles" widgets and the like.
To create a new module, go to Extensions -> Module Manager and add one. Now, you can create a module that lists a batch of menu pages.
Lastly, you need someplace to put your modules on the page. The "template tag" if you're coming from Wordpres, is "". Drop that in your template on the sidebar, and change the name (the bit in parenthesis), to something like "sidebar".
Now, if you go back to the module manager, click your "Menu" widget, you should see a dropdown on the left where you can select the "position" the module should sit in. Select (or type in) "sidebar", and now that menu will be dropped into the page whereever you've placed your tag.
I would suggest you to go through the joomla 1.5 quick start guide, there you will find how to do that along with other stuff. This is the pdf file.
I'd agree with Sarfraz.
You could also check out the guides from Compass:
http://www.compassdesigns.net/joomla-tutorials/joomla-15-template-tutorial