How to add a single menu item in wordpress to my plugin - plugins

I am trying to create my first wordpress plugin and I want to add a new "menu item" in the wordpress default menu bar. So when I click that menu item, the html form need to be shown by my plugin.
comparing to Joomla, in joomla it has views in "components" so I can easily create a new menu item, and assign a view as I want. In wordpress how do I do that for a plugin?
Please help. Thanks

I recommend that for your form for the front end, make a shortcode that will render your form. Then people can create a page (which gets you your menu item) and put your form on the page, optionally with some text / images above or below the form. This is better than trying to insert a "page" into the menu and somehow getting it where your plugin's users want it to go :)
For the admin side, use the admin menu functions.

Related

web matrix and orchard cms editing the "Add Widget" Page

I am very new to the use of Orchard. I installed Web Matrix 3 and added Orchard CMS to it.
My question is :
On the admin Page from which i got access to everything on the new orchard cms site, i go to "widgets" and try to add a new "Html Widget".
it redirects me to an "Add Widget" page with input boxes for title, date and other things, and also an text editor in which i can put anything i want.
I want to be able to put an image there and then be able to drag it around the editor container...so when i save this widget the image will stay on the position that i dragged it to inside the editor.
How and / or Where can i do that?
Thanks in advance!
It depends on what editor you use for the HTML body. Default it uses the TinyMCE editor, which provides an 'Add image' button to insert an image:
When you click this button you can insert an image from the image gallery of your Orchard Media section.

Wordpress - Show Portfolio Categories

I'm working with a WordPress website and a client wants to show a list of categories in the footer. Unfortunately, it is showing as empty because he has no posts and has set the categories to portfolio items which he wants people to be able to click to.
So, how do I show the portfolio categories in the widget rather than the post categories?
Thanks,
Jack
Probably the easiest way I can think of to get the result that you want without having to resort to changing any Theme Files would be this:
Log into your Wordpress Dashboard
Navigate to Appearance->Menus
Create a new Menu, and (if applicable) enable the Custom Taxonomies for your menu by clicking on Screen Options (top right-hand corner of the page) and ticking your Portfolio's Custom Categories and/or Custom Post Types
Once all of the items you want is in your Custom Menu, save it.
Navigate to Appearance->Widgets
Add the Custom Menu Widget to the sidebar in which you would like your items to appear
Select the Custom Menu you just created, and Save
When dealing with Premium Themes, it would always be safest to stay out of their code and avoid changing anything altogether, so try this approach first. Otherwise, you may have to get your hands dirty and alter some code or contact the Theme Developer.

Hyperlink to Eclipse editor page

I am trying to write an editor for a particular type of file in Eclipse which has multiple pages, just like the PDE editor.
How do I get a hyperlink in the main Overview page to point at one of the individual pages?
I've got the hyperlink drawn but I don't know how to link it to the actual page so that when a user clicks it, the page view changes.
Any ideas?
Follow this recipe:
Create the main page and all the sub pages
Add links
Add HyperlinkAdapter to the links using link.addHyperlinkListener()
In linkActivated() you can switch the page with formEditor.setActivePage(...)

How do I get html data to show in an panel when I click an item in my listbox? gwt

I am using eclipse with the google web toolkit plugin and have built a widget which has a ListBox and a horizontal SplitLayoutPanel. I want to be able to click on an item in my list box and have it display the HTML in the top pane of my split panel. I think I need to setup click handler but I am not quite sure how to go about this. Please give me a push in the right direction.
Add a ChangeHandler to the listBoxInstance. In the onChange, get the selected value using getSelectedIndex()/getValue(). Process as required.

How to set the front page to be the front page in Joomla

In Joomla how do I set the frontpage to be the front page (without being in the main menu). Currently whatever I set to be the default in the main menu is the first page, but I don't want the front page to be in the main menu.
this si the site
Solved it. I made the front page the first (default) page in main menu. Then I hid the main menu and made a new menu with things I want to be shown.
Another way is to do the same thing with one of the other menus or create a new menu..this way you have the flexibility of using your main menu on the front page