Drupal 7 Blocks not respecting weight - css

We have added a block to one of our pages that contains normal content.
For this page we have ensured that the block only displays on the specific page.
In the Blocks admin control panel we have ordered the block so that it is supposed to appear below the main content block by giving it a heavier weight.
When we save and clear the cache, then reload the page the block is still at the top.
I checked the generated HTML and indeed it is putting the block first, so it's not css reordering it.
Any ideas?

there can be several reasons:
website is using context module which has higher priority blocks
weight are changed in the code somewhere (custom module)
look into your database and check what height those blocks have
if non of these helps, try turning off your modules one after another and check the results

Related

Identifying Pages in ASP.net

I am working on a website using DNN as my Content Management System of choice, and I'm running into an issue where the main content area and the side area will switch based on which page you are on.
In the .ascx file I know I can write a conditional based on the URL you're on:
<% If Request.RawUrl.Contains("piece-of-url") Then %>
but I was wondering if there is a more permanent or reliable way to mark a page, just in case the page name changes, or if there are pages underneath that page that may not have the same styling (although, I can include the extension as a way to get around this).
Thanks for your help.
In DNN if you want to change the way the page functions, base on the page you are on, you would typically either define a separate SKIN as Brent Mannering suggests, or apply a differnt module to different pages on the site.
That being said, you can also target the "TabId" of DNN pages, in the code for the ASCX file for the Skin you could define functionality based on the tabid.
When I've needed to do this, I've created a 'Bookmark' module and added it on the page.The bookmark module just stores a value pair in the settings, in my instance I was using values like <"HotelHomePage", "Hilton"> or <"DestinationHomePage", "Sydney">. This way, page name doesn't matter, you can change the page name, move the page to a different parent, but as long as the bookmark value on the page stays the same, you will always have it.
Just make sure that a bookmark exists for each page you need it on.

Loading different aspx pages into an area without reloading the entire page

I have written a longer text on this subject posted earlier today. Perhaps the text was too long, so I rephrase it very briefly here:
I want to design a very standard site where the user gets the opportunity to navigate to different aspx pages with the aid of navigation menus (left, top). I do not want the entire page to be reloaded when changing the content page for three reasons: state handling, flickering and bandwidth conservation. I just want to load a new aspx page into a "main content area" with the rest of the site untouched.
What is the best way to achieve this? I must not rely on master pages or not master pages or AJAX or not AJAX. It must not rely on anything specific. I just wonder what the standard method would be to achieve this. It must be a pretty common wish.
Thanks
/DT
You can use iframe for this.
The <iframe> tag specifies an inline frame.
An inline frame is used to embed another document within the current HTML document.
<iframe src="http://www.w3schools.com"></iframe>

Is it better to cache an element in the block/view or the panel?

I am creating a panel page that will pull in blocks from a view? I want to cache these blocks. So is it better to enable caching of that element in the panel or do it where it was created in the block/view page? Or does it matter?
FYI, There are other areas of the page that are too dynamic for me to cache the entire page using other methods
Go to the top level, to get the cached version faster. In this case, that would be the panel page.
That would also cache the entire pane, instead of just caching the content of it, be it a block, a view or something else.
If you have a panel, containing a block display of a view, you're doing it wrong (probably). You should be using a content-pane display of your view for use in the panel.
That said, only the outer-most cache is used, so if you cache the panel, and cache the block inside the panel, and cache the view inside the block, only the panels-cache is actually used.

Can you have 2 views with separate exposed filters on 1 page?

I have two views loaded on the front page. Both contain exposed filters which when modified, display different content (done using the Better Exposed Filters module).
When modifying one view the URL will be http:example.com/?cid[]=1 and the changes will take effect.
When modifying the other view the URL will be http:example.com/?type[]=marketing_item and the changes will take effect however, this will reset the first view (this problem also happens when reversing the process).
Am I missing something or is this type of functionality not possible?
Process $_GET['cid'] or $_GET['marketing_item'] in argument handling code of your views...

Edit what displays in an iframe

I'm trying to display content from anther site on to mine using an iframe. I'm just wondering if its possible to only display certain parts (divs) of this external page in the iframe.
Thanks!
You could try and use some jQuery on your site to dynamically alter the styles of the external site. I did something similar with SSRS where we had an iframe containing SSRS reports which we wanted to style. We used jQuery in the master page to find the matching elements inside the frame target and alter them as required.
As long as the external site is well marked up (plenty of ids, good semantic structure) you may be able to hide/re-arrange elements as you require. You may also need to delay the jQuery execution as the frame contents may not be completely loaded by the time your JavaScript executes.
You can find a VERY simple example here.
BUT, be careful of the legalities involved with showing partial content from someone else's site. If you're presenting their site as your own or without identifying information, you could be infringing on their copyright.

Resources