Joomla menu manager options are not displaying - css

I have built a menu item where I am trying to apply a custom CSS class in the “Page Display Options.”
I have the settings configured as you can see below:
When I refresh the page, I am getting no title pulling through or the customized hide_password_field class.
I have tried a handful of things that I would think to do with no luck. Examples are clearing cache and emptying browser.

This is most likely because there isn't a style signed to the position for that module. In your templates JDOC element for the module position in question, make sure you have the style attribute set to XHTML.
<jdoc:include type="modules" name="my-position-name" style="xhtml" />

Related

Trying to change CSS on New-Post page (WP-admin)

I’m inside the New Post page on WP-Admin, where you can create a new post.
At the right column, there’s the category selector, in which you select the category for that new post.
I have something like 15 categories, and therefore the category box is showing with a scrolling bar. Since I need to automate some post creation, I need all the categories to be visible right away, without having to scroll.
So I found the css file that manages the height of the category box (it’s inside /wp-admin/css/edit.css and //wp-admin/css/edit-rtl.css) and there I changed the CSS files to allow a bigger height by default on that box.
However when I open the new post page, it still shows the small box in categories, and when I see the CSS rule, the change I made is not visible. It’s like the CSS is cached or something. I already made sure that my browser is not caching it.
The problem I think it’s because the CSS rules are not pulled directly from CSS files, but from this file:
http://www.website.com/wp-admin/load-styles.php?c=0&dir=ltr&load%5B%5D=dashicons,admin-bar,buttons,media-views,common,forms,admin-menu,dashboard,list-tables,edit,revisions,media,themes,about,nav-menu&load%5B%5D=s,widgets,site-icon,l10n,wp-auth-check&ver=4.7
That file seems to go and gather the CSS information from some place (which I assumed was the CSS files in the wp-admin/css/ folder, in which I could find the exact same CSS rules that were applied to the category box) but for some reason, it’s not retreiving the updated CSS file. Or something else is happening (Server side caching the PHP response and therefore retreiving all the time the old response?)
I wouldn't recommend tampering with core admin files, as any changes you make could be lost from a WordPress update.
The proper way to do it is through a custom function added to your theme or child-theme functions.php file:
add_action('admin_head', 'custom_admin_css');
function custom_admin_css() {
echo '<style>
/* remove scrollbar from categories panel */
.categorydiv div.tabs-panel { max-height: none !important; }
</style>';
}
Another options that will allow you to have CSS for individual pages is to use this OH header/footer plugin. Once you install the plugin you can then add your CSS in the header textarea of the pages admin. Just make sure you enclose your CSS within a <style></style> tag.

Custom background theme support not being applied

I've added theme support for a custom background to my WordPress theme, as below, but the background colour is not actually being applied (note that the options are showing correctly in admin though).
According to the docs "When the administrator sets custom values for the theme, WordPress generates an extra style sheet in-line with the HTML headers." However, this is not the case.
The <body> tag is declared as <body class="home blog logged-in admin-bar customize-support">, with the promised custom-background class neither declared in the header nor applied to the <body> tag.
Is there something I'm missing here?
Here is how I am adding custom background support.
$ps_background_defaults = array(
'default-color' => '000000'
);
add_theme_support('custom-background', $ps_background_defaults);
The problem was that I hadn't saved the custom background settings, and once I'd done that everything was fine.
This does seem like an issue with the core to me, as the default is ignored, and I am off to do some research on Trac now. I'll update with a ticket if one is opened.

How do I link the logo to an external site?

I would like to change the link in the Plone logo viewlet. By default it points to the Plone site root, I want to point it to a location that is not within the Plone site.
I tried writing a custom logo viewlet, but this seems very complex for such a small change. What is the best way to do this?
The easiest way to change the Logo link is to override the logo viewlet template. This is best done with z3c.jbot.
You need to add z3c.jbot to your projects custom product, by adding it as a dependency in setup.py, and also set up the configure.zcml correctly:
<include package="z3c.jbot" file="meta.zcml" />
<browser:jbot
directory="templates" />
Don't forget to make sure you have the browser prefix added in the <zcml> tag.
You can now copy the logo.pt file from plone.app.layout to the templates directory in your custom product. Rename the file to plone.app.layout.viewlets.logo.pt and change:
tal:attributes="href view/navigation_root_url;
title view/navigation_root_title"
To:
href="http://stackoverflow.com"
Restart the server, and the logo link has now changed.
Alternatively you can edit it via ZMI (/manage) in portal_view_customizations. And search for the "plone.logo" view.
It should open this url in the frame:
/portal_view_customizations/zope.interface.interface-plone.logo/pt_editForm

Joomla module positions not working

I'm using Joomla, and as far as I can tell I have done everything right for my template, but can't get Module positions to work
I have the correct XML file setup I think and this is my HTML tag:
<jdoc:include type="modules" name="topnav">
The page is X if you look at the page source it is rendering that tag - I would expect that to disappear, and to be replaced with the content I have told the Joomla backend to put there?
Very confused!
Try this-
<jdoc:include type="modules" name="topnav" />
You are missing closing tag.
let me know if this does not work.
How are they not working? Are the positions updating in admin, but not on the website? Or are they not updating in the admin page too? From what I remember of Joomla, you have to click on the 'save' icon once you've rearranged all your positions.

Adding custom CSS to Drupal 7 to hide the message

I use my custom block for displaying a flash game at the front page of my Drupal 7 installation, but there is also the annoying message:
<div id="first-time"><p>No front page content has been created yet.</p>
<div class="item-list"><ul><li class="first last">
Add new content</li>
</ul></div></div>
below it and I can't remove it. Is there please a hook for adding custom CSS? In my module I would like to make the #first-time light grey or invisible.
I prefer not to add a blank content just to get rid of that text.
Thank you!
Alex
UPDATE:
I've added the following to my module:
function game_init() {
drupal_set_message('XXX init called XXX');
if (drupal_is_front_page()) {
drupal_add_css('#first-time {color: green;}', 'inline');
}
}
but don't see that CSS-code or XXX string inside my front page.
UPDATE2:
Oh, I had to clear the cache and now it works (the Drupal docs seem to be wrong here - there was written that 'inline' CSS is not cached...)
Hiding the CSS is the WRONG way of doing it. why did you created your content as a Custom Block?
you should create a "Page" and set this page as front page in the Configuration->Site Information.
Whatever. you can also use any of these options but is not recommended.
you can also also add a BlankPage by Adding only the Title(then hiding it in PHP on page.tpl.php)
you can add your css in /templates/themes/bartik.info
you can call drupal_add_css on the _init() hook of your custom module.
Blocks are used to display information in every page(although we can set to display only on certain pages). Say For Example. A Menu, or A Shopping Cart etc.
If you want to add some CSS for a module, you should use drupal_add_css()
Why not simply add this CSS to your theme?

Resources