Is there any way to highlight the current menu which have been clciked.I am using left-mnu.jsp in which i have all the menu which i am including in each jsp pages.Now i use a variable clicked and update this variable to some value when i open main jsp pages.Then am checking this variable in left-menu.jsp to highlight the appropriate menu.I know this is not a good approach.Can any one suggest me a good one for highlighting menu.
You can do that with CSS only, setting the id of the home with a word related to the id of the selected menu item, like described here.
Or with Javascript, matching the URL of the current page with the URL of the menu items (if they're href), like described here (approach #2)
Or do it with JSP tags, etc...
Related
I want to add some components to my navigation menu (user picture, name, search field), and navigation bar(dropdown menu with user informations), to get like this result.
The User Picture and menu here is the how-to (I'm not going to type it or copy/paste since this exact question has been answered somewhere else):
Apex Profile Menu
The search you did not specify exactly what you want to search on but to add an object to the menu panel here is the how-to (I'm not going to type it or copy/paste since this exact question has been answered somewhere else):
region-in-left-side-navbar-menu
Update 1:
To add JS or CSS to a page you need to edit the Page Properties (Ensure the Show-all is selected) and you will see the fields for JS: File URLs, Function and Global Variable Declaration, Execute when Page Loads and CSS: File URLs, Inline.
Update 2:
You'd need to search on appropriate APEX view and from there get the right value:
I'd use this query to start what you need:
select APPLICATION_NAME,LIST_NAME,PARENT_ENTRY_TEXT,ENTRY_TEXT,ENTRY_TARGET
from APEX_APPLICATION_LIST_ENTRIES
WHERE APPLICATION_NAME = 'Your-App-Name'
I've been trying to get a selected dropdown option to appear in a Word Document on export.
The current default behavior is that all option tags appear in the exported document with no indication of which was selected. (This makes sense that this behavior would occur since the export function is simply exporting all the html as plain text).
So far, these are the approaches I've tried (none of which work):
-Capture the export event before it is sent to the controller via the javascript execute event (thus being able to strip out any unwanted text). The issue is the execute event and exportas event are asynchronous, so I can't modify the file before the export event call is executed.
-Modify the text on the controller side before it is converted to a Word document and downloaded (the text is sent through without special characters, which makes it nearly impossible to parse)
-Attempt to replace the dropdown with a kendo autocomplete widget (this would also be an acceptable solution). The widget does not render properly inside the document. All of the datasource options are there and even filters corretly, but it does not style correctly or open.
Has anyone else been able to find a solution to this problem or have another approach I could use?
EDIT:
As per requested, here is a screenshot of the base code:
My initial idea on how you could accomplish this:
1. Pull that select list out of your editor.
2. Bind an event handler to the change event of your list to add the value of your list into the editor. Are you using JQuery in your project? It's a dependency for Kendo so this ought to work:
$("#selectListId").on("change", function () {
$("#editor").val( $("#selectListId").val());
});
In reality though I'm guessing this approach will be used to populate some template of text with values selected by the user? In that case, you may want to save the template first before applying the value selected.
Now that you've identified you need that dropdown menu to be usable on the exported word document, attempt the following:
Create a new word document.
In that word document, open the Developer tab. (If you don't know about it, google how to enable it)
Insert a new Dropdown Menu Content Control using the Developer tab.
Select this content control, then open Properties menu item on Developer tab.
Update the content control with your values:
Save this word document.
Use the Kendo Editor Import to import this document containing your template.
Attempt exporting what was just imported.
If that works and the editor has editable dropdowns from that content control, I will be very surprised... Good luck!
I would kindly ask for your help :) From couple of days I am trying to achieve "linked" custom field in content editor and dropdown in page editor.
Basically I want to have dropdown in page editor and content editor which are responsible for a same thing.
In my c# code i have enums which represent directions. I created custom field which accepts assembly and class with overridden onload method and successfully populate dropdown values in the content editor. So far so good but i have no idea how to create dropdown which will represent the same functionality inside page editor.
So please give me any ideas...
Judging from your reply to my comment you need to think of the following: How is my field value being rendered onto a page?
If you are always using 1 control to do this then you just need to ensure that this control has 2 different rendering modes depending on the Context.PageMode
But as I understand it you want this dropdown to also appear when someone renders your custom field using a <sc:FieldRenderer>. In this case you'll need to look into the RenderField pipeline of Sitecore. There you find a processor called RenderWebEditing. Possibly through some manipulation here you can get your dropdown appear as you wish.
As declared in the title, for example, I want to search for a button whose name is button8, within a form where there are so many buttons that I do not want to check the name one by one.
Can I do this in VB6?
You should just be able to refer to the control via the controls collection, like so:
Me.Controls("Button8")
See this link.
Here's how to find a control in the form designer, if you know the name.
Go to the form designer, open the property window (press F4), and use the dropdown to choose the control. This shows the properties in the window (and you can edit them). It also selects the control onscreen.
I have a number of Template Styles. If I change the default Style, I can see that my Styles are working. The Style actually changes. But for a week I have been trying to find out why my menu assignment doesn't work. I'm completely baffled.
So I have found two possible places where I could possibly change my Style per menu item. Either in Template Manager: Edit Style -> Menus assignment -> ticking the menu item. Or Menu Manager: Edit Menu Item -> Changing Template Style. I have tried these settings a hundred times. Those settings have absolutely no effect.
Where can I change the Style so that I get different Style for each menu item (by menu item I mean the page opened by the menu item)?
Try to create separate style files like mymenu1style.php, mymenu2style.php etc. together with corresponding XML files as it is described at http://docs.joomla.org/Layout_Overrides_in_Joomla_1.6 in Menus section of that document
Then assign each style in Menu Manager "Edit Menu Item -> Changing Template Style"
I found the answer. I didn't use the actual Joomla menus before so I didn't know what links they produce. And there was a trick in the links they produce. On Menu Manage: Edit Menu Item there is the Link for the menu item ready for copypaste. However, this link is for example:
index.php?option=com_content&view=article&id=65
and the Itemid variable is missing from that! If it's missing, the template style will be the default one instead of the assigned one! So the correct link is, for example:
index.php?option=com_content&view=article&id=65&Itemid=205 (note exact cases on Itemid) (the Itemid, aka ID, is in fact also on the same Edit Menu Item page, but just separately)
Or the other correct link is, after enabling Global Configuration / Site / SEO Settings / SEF URLs Yes:
http://site.com/index.php/menualias
That would also render with the assigned template. Or without the index.php/ part with the URL rewriting option.
So, which overrides which: the Edit Menu Item / Template Style setting or the Template Manager: Edit Style Menus assignments? The answer is, according to my test, if you keep the EMI Template Style as - Use Default -, then you can change it from Menus assignments. In other cases, the last saved situation overrides. If you have EMI Template Style set to mystyle1 and Menus assignments the same page is set to mystyle2, the latter will override while the EMI Template Style remains set to mystyle1. So it's a bit confusing. Then if for the page you change EMI Template Style to mystyle3, that will blank out the Menus assignments setting and therefore override that.