Add item to "Add menu items" section in wordpress - php

I am developing a wordpress theme. In the "Menus" there is a section:
How can I add an item to this programmatically? is it possible?
Update:
If that is not possible, how can I add "icon" and "open in new tab" options.
I've searched a lot but didn't find anything. Can anybody introduce a source?

You can enable the Link Target and CSS Classes options from the Screen Options avaible in the top-right of the menu admin area. Link Target is a checkbox that provides the option to Open link in a new tab. CSS Classes is a text-field that you can use to add your custom CSS class. You can then display your icon using CSS.

Related

How to add custom html-code to Joomla 2.5 menu items?

Situation: I have old site Agroteplica based on Joomla 2.5. I need to add custom html-code to menu items (for example, icons, or bold). I need unic icon for each menu item, so it's no use to edit php-template of page.
If I try to use html-code in menu item header - Joomla clear it, only text remains. I tried to find some manuals, and added line filter="raw" to file modules.xml:
<field name="title" type="text"
description="COM_MODULES_FIELD_TITLE_DESC"
label="JGLOBAL_TITLE"
maxlength="100"
required="true"
filter="raw"
size="35"
/>
But it didn't give any effect either.
Question: what I need to do to make it work? :)
Here is what Joomla provides for cases like this:
In Menu Manager -> Menu Item Edit
Editing each menu item, you will see the "Link Type Options" section at the right column.
See screenshot:
As you see in the screenshot, this group of settings contains the follow options:
Link Title Attribute : You can add your custom Title attr to the menu item's a tag.
Link CSS Style : You can add a custom css class for this menu item's a tag.
Link Image : You can add a custom image for this menu item.
Add Menu Title : If you add an image, you can choose to hide the Title of the link (setting = No), or choose to show both Image and the title (setting = yes (default)).
For you case, you can either choose you custom images-icons that should be displayed next to your menu items title. If you want bolds or other styling options, you can add your custom css rules to the items you want, and then add your css styles at your template's css.
For example you have decided that for some of your menu-items you would want their text in bold. Then you could do as follow:
1 .Give them a css class to all of them, in the Link CSS Style field: e.g. 'bold-items' (without the '').
2. Open your template's css file with a plain text editor and add the following rule at the end of the document:
.bold-items {
font-weight:bold;
}
Notice: The above settings might have no effect at all, if you are using a 3rd party menu module, or your template contains overrides for the default menu module. In such case you will need to add further template overrides for the menu module in use, in order to implement the above settings.
*Not sure what you mean with menu item header and how you did try to add html-code to it.
*Update / Answer to your comment:
You never mentioned about video in your question. You asked about adding icons and making text bold. What do you mean with headers and what kind of code and where are you trying to insert it? Are you aware of what is involved in the process from the moment you create menu items in the menu manager till you see those in the front-end of your website?
Following my answer above and assuming you have basic knowledge of the workflow (menu module, template overrides, css) you will be able to add images/icons or custom styles for each menu item. If you want to have video inside your menu, then you...
... will need a more sophisticated menu module. These are called Mega Menus and allow the user to display various types of content inside their menus, like modules, in various ways. You should either install a such module or create one on your own.

Change/rename Drupal 7 overlay tabs

I am having a task where I should change overlay tabs the way it appears/ rename the tabs that appears on a node edit (please have a look on this screenshot http://bit.ly/VIMMXK)
I should not have the "Edit" on the overlay
The "view" should be renamed to "View (content-type)"
Tab Tamer module lets you change the name of different tabs on the drupal site. It also allows to to disable or hide tabs.

Adding rel="nofollow" to joomla menu item

I want to add the rel="nofollow" to the links on joomla menu item. This option is not available on administration backend. The robot add the attribute "nofollow" to the meta data of the page on that menu item not the actual link. Any help would be appreciated.
I'm using joomla 2.5
You have to override method that show your menu items. In website there is many articles about that.
Try these link:
http://forum.joomla.org/viewtopic.php?t=470383
http://extensions.joomla.org/extensions/structure-a-navigation/site-links/8733
You don't really need to add any parameters to your menu items, you can accomplish this by overriding your menu module. In the menu module, check for the value of the robots parameter then add the appropriate rel to the link it creates.

Social Engine How to add or edit menu items

I am new to Social Engine. I am trying to add a custom menu item that will work with jQuery.
But I need to understand where is the file or files to edit in order to apply these changes.
Can anyone tell me how the Social Engine core is organized?
How do I find the files that control and generate the menu items?
Go to Control panel > Layouts > Menu editor and add new menu items to existing menus. From the same page you can also create new menus and later add them to any layout using the layout manager.
You should be able to add jQuery functionality to any menu by editing a suitable view file. Like if you want your jQuery to be available site wide then you can edit application\modules\Core\layouts\scripts\default.tpl and other layout scripts on that folder.
You can also create menu plugins. Take a look at this table on database- engine4_core_menuitems. You can see some menu items have corresponding classes. Find out those classes in SocialEngine and try to understand how they work. You can add conditions, small javascripts using these classes and this is recommended way to work with SocialEngine menus.
go to admin(control panel)
Layput
Menu Editior
As mentioned previously, we recommend editing menus in the Menu Editor which can be found in the Admin Panel > Layout > Menu Editor. For detailed instructions, please see: http://support.socialengine.com/questions/217/Admin-Panel-Layout-Menu-Editor
You can view the below mentioned video URL to understand the working environment with Socialengine Menu through admin user :
https://www.youtube.com/watch?v=Frc5U6iB_wg
need to click on Control panel then Layouts then Menu editor and add new menu items to existing menus. From the same page you can also create new menus and later add them to any layout using the layout manager.

how can i create the menu that will open only the article in joomla?

I have created the articles and menu items that links to that articles. This all works.
But now what I want is, when I click on the menu, it should open up only article (without any template feature, no header , no footer and not even the menu).I am opening the article in a new window. From googling what I found is if I add &tmpl=component to the url it will just load the component, and that will show just the article. But I am not sure how to add this parameter from admin screen to the menu items. The link which is showed in admin screen is not editable!!!. Or should I have to develop a custom menu module to achieve this!!!?
Thanks for help.
Tanmay
Create a new menu item - External Link and then paste the full URL into the box.
http://www.jeepstone.co.uk/2009/03/06/open-content-in-a-modal-pop-up-in-joomla/

Categories