English 中文(简体)
How do you alter the page_load for DotNetNuke
原标题:

For the main menu, I want the first four links to be blue, and specifically the last four links to be yellow. There will only be eight menu items.

I was thinking of hard coding the yellow links into the menu div, and that way when the page loads the first four menu items (default colour blue) they will be blue, and then my hard-coded links of yellow would load up.

My question is, where can I add the "yellow" code? Where can I hard code my yellow menu items? Or is there a different, better, approach to this?

最佳回答

My first question would be which men u are you implementing? A lot of them have a menuitem_x sort of id that is applied to the menu markup so with the CSS you can do what you want

As for where to place the markup there are a few places

  1. You can do it directly in the skin files (not suggested since you may have to edit a few files)
  2. in the skin .css files (much better place to do it and more maintainable and portable)
  3. in the admin go to Site Settings and use the stylesheet editor to add the classes to the portal stylesheet (better than #1 but not as good as #2 since its now specific to the portal and not the skin so it wont be as portable)

Number 3 - works good if you dont have access to the skin or dont want to change it for other reasons

问题回答

You could use Javascript within the skin.

We have done simular in the past for DNN menus but i keep away from the skinning side so dont have any examples, sorry.

Google does though :)

I would use one of the specific SEO friendly DNN menu modules that generate clean code that can be followed by search engines. I usually use one of them, except for projects where I don t have SEO concerns. When you have a menu with clean markup, like a list, you can change the colors using jQuery and specifying the first four items. You can probably do it like this, one by one. There may be a better selector for grabbing the first four items which is something I have never used.

Solved it, not as dynamic as I d like, but it works.

The way I ve done it is I m playing with id tags, rather than class tags. Using ID, I can pick out the individual menu items and apply CSS to them.

Essentially, it looks like I ve done what codemypantsoff suggested. Thanks!





相关问题
How do you alter the page_load for DotNetNuke

For the main menu, I want the first four links to be blue, and specifically the last four links to be yellow. There will only be eight menu items. I was thinking of hard coding the yellow links into ...

ASP.NET MVC project to port [closed]

Is there a project out there that attempts to replicate or re-create a portal framework like DotNetNuke using MVC framework

how to install dnn (v 5.2.0) in vs (any of 2005 or 2008)?

i need to install DNN on my pc. I dont mind what dotnet version this would be: either 2005 or 2008 but i need to install DNN v 5.x.y and not any previous installation + also need to configure in my ...

dotnetnuke doubts

i want to build a website in dnn 5. i have studied dnn5, its installation, starter-kit installation, built-in modules (both of Host and Admin), installing a custom module (from module extension), ...

Develop a Family Tree Portal with several functinality

We need to develop a family tree portal which also supports functinality like Portal Framework (Sub portal) Dashboard Blogs, Forums, Events, Polls, Task Member subscription Advertisement Chat ...

Domain Name Windows Vista Does Not Exist In The Database

I am trying to install DOTNETNUKE model on my local machine ( Windows Vista) but seem to be running into a problem right after installing the Database. Not exactly sure where to go to fix the problem ...

Find all CSS styles used on website

I have a DotNetNuke skin that has a single CSS file over 3,500 lines long. It contains styles for YUI, Telerik, Cluetip as well as the actual customisation of the site. The old developers just kept ...

热门标签