MvcSiteMapProvider with [Route] - mvcsitemapprovider

I have a controller method with this signature.
[Route("clients/{_pmcp?}")]
public ActionResult ClientList(PartyBillingListModel model)
The site map node looks like this:
<mvcSiteMapNode title="Clients" controller="Client" action="ClientList" area="my" preservedRouteParameters="_pmcp" cacheResolvedUrl="false">
The urls look like this.
The optional number at the end represents the page.
Only the first url is recognised as belonging to the controller method.
The breadcrumb is only shown for this first route.
How do I correct this?
http://localhost:37959/my/clients
http://localhost:37959/my/clients/1
http://localhost:37959/my/clients/2
I am using version 4.4.10

Bug (4.4.10)
Hi,
I have discovered that this was a bug in the 4.4.10 release.
It's working correctly in the version available on nuget today. 4.4.12.
It might be related to this pull request: https://github.com/maartenba/MvcSiteMapProvider/pull/273
Thanks
Regards
Craig

Related

No tag "notifyMessage" defined in tag library imported with prefix "rich"

I'm busy getting this red-line when trying to use <rich:notifyMessage>. I'm used to primefaces but for this project richfaces is inevitable, hence i'm quite a novice here. I'm using richfaces 3.3.4 final and all required jars are included. What could I be missing? Is there a perfect alternative for a notification message pop-up apart from <rich:message> or <rich:messages>? I'd really appreciate a working example too. Thanks in advance.

chosen jquery not show correctly

I use chosen 1.2.0 from nuget. My chosen.css file contains class like .chosen-container, .chosen-container. When i call my dropdownlist class using .chosen() function. Resulted css class will be chzn-container, chzn-container-multi. It causes display ugly. but functionality work. I have no error in browser console.
When i check another sites, both generated markup and chosen.css contains chzn-container, chzn-container-multi classes only.
Nuget adds only css. It is not add chosen.jquery.js. I don't know why.
The Nuget package named simply "chosen" does not, as the OP says, contain the .js.
You need to search for Harvest.Chosen. Hopefully this will help someone in the future.

How to get the locale in Symfony 2.1 controller?

I installed, the bundle: https://github.com/lunetics/LocaleBundle which help to switch between language. Everything works fine, in twig, translation works fine. But when i want to translate any message in the controller, i get french (fr) instead of defined language (en for example).
Please how can i get the current selected locale in the controller ?
i use: $this->getRequest()->getLocale() but it does not work, it give me FR for each culture.
my default setting language in parameter.ini is FR
After looking inside the code of LuneticsLocaleBundle and Symfony 2.1 Documentation, i discovred that, symfony2.1 is passing the Locale in route. The problem exists when rendering an action from twig template, where symfony creates nes request. So, to resolve this, i override the code of LuneticsLocaleBundle and i added $this->get('session')->set('_locale', $_locale); in the switchAction of LocaleController of the bundle.
So, the locale, will be stored in session.
I hope that can helps you too.

How wappalyzer(Mozila addon),GTmetrix finds the cms platform

I am currently developing a site which is not supposed to expose its developer magento platform(Sorry about that ).
I thought the wappalyzer(Mozila addon),GTmetrix site is finding the cms names by its html format but when i saw a empty white page with that tools it still shows me like am using Magento(there is nothing in the source view - its white page), so now how they are finding that am using magento. Any idea about hw they are working? I checked headers but there nothing specially mentioned as magento. Same goes with wordpress/joomla - simply wappalyzer(Mozila addon),GTmetrix finds the site platform even there is no html source.
So I guess something with in header(i might missing something) or what it can be? please advice. Attached screenshot of it.
Thanks in advance
You can view Wappalyzer's source code: (Ctrl+F Magento):
https://github.com/ElbertF/Wappalyzer/blob/master/share/js/apps.js
Most likely Wappalyzer picked up on the "Mage" JavaScript variable. You can see this by clicking the DOM tab in Firebug.
They are finding it using the words like mage,varien,magento. If it finds any of these words inside css/js file class,#id,inside comment then it found it as magento.
Also gtmetrix does one more step , like it is checking the css/js url path - if it fins the url like skin/frontend then it says it as magento.
Dont forget cookies...
I use FireBugs. Go to main menu -> Cookies
There is frontend in cookies.

JSF Navigation with Different CSS Class for Current/Active Path

I'm trying to create a menu template in JSF where the link for the current directory has a different "current" or "active" class. The code currently looks like:
<ul>
<li><h:outputLink value="#{request.contextPath}/a/">A</h:outputLink></li>
<li><h:outputLink value="#{request.contextPath}/b/">B</h:outputLink></li>
<li><h:outputLink value="#{request.contextPath}/c/">C</h:outputLink></li>
</ul>
I'm thinking of using something like styleClass="#{(thisDir == currentDir) ? currentLinkClass : normalLinkClass}". But how do I get the current path? Is this even correct, or is there a better way to do this?
Also, I want the links to base on the current path, not just the page. For example, myapp/a/1.jsf and myapp/a/2.jsf (that is, myapp/a/*.jsf) should trigger the active class for the A link. (I hope my explanation is clear.) Is this possible? How should this be done?
Thank you very much!
You can use #{request.requestURI} to get the current request URI. You can if necessary use several EL functions from JSTL fn taglib to do some string comparisons/manipulations in EL.
Your proposed EL styleClass suggestion is perfectly fine. There is no other easy way anyway. Best optimization which you could do so far is to render those links in a loop by an <ui:repeat> so that code duplication is at least eliminated.
You can also try this approach which uses #{view.viewId}:
<h:outputLink
styleClass="#{(view.viewId.equals('/admin/authors.xhtml')) ? 'active' : 'inactive'}"
value="authors.xhtml">Text</h:outputLink>

Resources