Current/Active Navigation Link State in Magento - css

I built custom navigation for my Magento site, now I'm scrambling on how to add:
class="current"
to the list item the user is currently viewing.
Thanks,
-Sam

I'm not entirely clear what you are looking for - but if you mean that you have added CMS pages to the standard menu (which is a common requirement) then you can test what cms page you are on using
Mage::getSingleton('cms/page')->getIdentifier();
The menu is usually called in catalog/navigation/top.phtml and this is not a bad place to add extra static links.
If that is not what you mean, could you give more details? Including what you have tried/what custom code you are using.

Related

How to have single-slug behave like a normal page in WordPress?

I'm making a website in WordPress, and I'm using a plugin ACF PRO. I'm doing the entire site with flexible content, so the WordPress site is like a page builder.
Everything is fine, however, I came to a point where I need to have same functionality for single-[custom-post-type], so I can "Add row", header, footer etc... on it, but I can't figure out on how to do it.
I know that it's possible, because e.g if you look at this site here: https://rolleragency.co.uk/our-projects/
You can see that it works. I know they are using flexible content because I worked on that site and I did there what I wanted. I can't remember how to do that.
I think I had to use a Tempate Page? Or? I can't remember.
THe site is built entirely on flexible content, so everything there is modular and it's like a drag and drop, but how do I do that on single-slug?
You have to create a page template, yes.
So something like page-projects.php then in WordPress admin you would have a page called Projects.
The template you created should be automatically applied to this page. If it doesn't for some reason you can choose which template WP should use on the right side when editing a page.
Now, you can add whatever code you need to the page-projects.php. And also any fields you may need for that page you can set up in ACF by telling ACF to apply those fields to pages that use projects template.
This is how I would and did do it on several occasions :)

Single page in Joomla have a different site logo than other pages

I've not used joomla much before. I'm trying to just get one page of a site that uses a Joomla template to have a different logo than the rest of the site, or even hide it. I'm mostly a Wordpress developer, so just don't know how this can be done in Joomla.
Is there a way to assign a body class to one specific page in Joomla and have it hide the element?
If you edit a menu item, you want to look under "Advanced Options" and then "Page Display Options". There is a box for "Page Class" which adds a class to the page, so a body class as you wanted.
You can then tweak your template to show different pieces in CSS based on this class.
If you want to drastically alter the page, you can also assign different templates to different pages through the template manager. This takes a little more work (since you have to install and set up another template).
This would be the preferred way to handle a lot of changes so you don't have to have lots of competing CSS based on page classes.

Wordpress link different color custom menu

I'm currently working on a Wordpress website with an custom jQuery menu. And everything is working fine except for one thing. I want to add a active class to an menu item that corosponds with the current page.
So basicly when the viewer is on the page "catering" I want the catering menu button the have an different style then the rest. But because it's wordpress I can't put in the html so I guess it has to be done with PHP but that's really not my thing.
So I was wondering if any of you could point me in the right direction. Here is the link to the website http://no-illusions.nl/projecten/kokaanhuis/wordpress/# no pages are currently working but when you hover over a button a brown layer appears, I want that layer to be static (when it's down) on the current home page but canĀ“t figure out the best way to do it.
Use wp_nav_menu (http://codex.wordpress.org/Function_Reference/wp_nav_menu). It attaches a current-menu-item class, as well as a few other useful classes (current-menu-ancestor, etc) for styling. Plus you'll also be able to easily edit the menu with the menu admin page.

WordPress - Modifying the MediaFlux theme

I have installed the MediaFlux theme from Mojo-Themes on my website at www.sjsueconomics.org. Here are my questions:
As you can see on the website, the blue menu at the very top of the page currently displays Page Titles. I want to display External Links there instead. How do I modify the code to do it?
The main menu (red text below the logo) currently displays Categories. Without changing the style or appearance, I want to display the Page Titles instead. How do I do it?
Thanks in advance!
The company you paid for the theme provides support, not a community which has no access to this product.
http://wordpress.stackexchange.com ; customizing a paid theme while providing no code (and having no right to provide any code) is not an appropriate subject for a StackOverflow question
if the theme supports custom menus, there ought to be a Menus page in the admin, under Appearances probably, or perhaps Settings. Go there, then create a menu with the pages or categories you want, then tell the theme to use the menu you created instead of the default. If the theme doesn't have such a feature, you'll need a programmer.

Staple Sharepoint 2007 feature to custom site templates

I have a branding feature that works great and staples to everything but custom site templates (as noted at the bottom comment on this MSDN article it's not possible to staple to custom templates out of the box).
stapling.xml
staple all site defitions to BrandingChildSiteInitializer
<FeatureSiteTemplateAssociation
Id="1204A425-D105-46c5-BB2C-473A2F27B563"
TemplateName="GLOBAL" />
staple blank site template to BrandingChildSiteInitializer
<FeatureSiteTemplateAssociation
Id="1204A425-D105-46c5-BB2C-473A2F27B563"
TemplateName="STS#0" />
In summary, this does not get stapled to custom sites that one creates and adds to site template gallery. So, when a user creates a new site based off a custom template the branding doesn't get applied. How would I get this feature stapled to every site?
I was thinking of something on my feature or other features in my solution that can add custom templates to the global list? Im not sure where to start regardless.
My .wsp is purely a bunch of custom C#, ASP, HTTPHandler etc that attaches a new masterpage and changes the theme. The feature in question simply tells the newly created site to use the properties of the parent (custom masterpage, theme etc)
If you've turned on publishing at the top level; you can force all child sites to use the parent masterpage.
Have look at this post, it mentions stapling to all sites via the GLOBAL name. There might be something different that this guy has done to create the stapling declarations working compared to your files?

Resources