Magento EE banners rotation with full page caching on - caching

A brief description of what I do:
- create 2 new test banners
- add a Banner Rotator to a cms page, either using the Insert Widget button or via a XML update in the Design tab, selecting the 2 test banners and rotating them as series, random or shuffle
- view the elected page in the browser, refresh
Only the first banner will be displayed.
If FPC is off instead, the banners will rotate as expected.
Is it a bug, or what am I doing wrong ?

The way full page cache works is that it utilizes placeholders for various data that is NOT supposed to be cached with the full page. Examples would include the mini cart, recently viewed products, etc. These separate items are cached and updated separately usually using a cache key that is made of a descriptive name plus the user's session ID.
This file: /app/code/core/Enterprise/PageCache/etc/cache.xml shows the placeholders.
A good example for what you need to do is here: /app/code/core/Enterprise/PageCache/Model/Container/Viewedproducts.php

Related

Using one Wix Dynamic Page for various entries in the site menu

I am doing a site in Wix.com so my wife can maintain it without my input. The draft site is live at:
http://www.wingspan.info
IMPORTANT: The wife is not a techie.
Essentially, the site displays our art work in galleries of paintings, etc, filtered by artist.
I have coded one page, then duplicated that to create the galleries and filter the WixDataQuery according to Andrew or Helen and Categories like Painting, Drawing, Sculpture, iPad Art, etc. Also, where we have exhibited (Exhibitions menu) some of our paintings.
All working, but any change to design and I have to change 15 pages...
So, it now strikes me that it would be more efficient to design one dynamic page, and set up the menu to display the different categories, as it is set up in the live site:
However, I can't find any documentation that shows how to use just the one dynamic page rather than my coded page duplicated to produce 12 different pages. Not clever...
Any suggestions / tutorials where I can find how to do this?
Thanks!
Basically, you want to add the Content Manager to your site if you haven't already, and then set up a collection with all of your data in it. One row per eventual "page" that you want.
Next, you can take the page you already designed and convert it to a dynamic page. It will then have a dataset on the page which you need to connect to various elements on the page through their connect buttons.
Finally, you'll need to edit your menu to point to the various instances of your dynamic page instead of the regular pages you have them pointing to now.
You can read all about how dynamic pages work here and here.

In ghost, how to sticky all the featured posts on the top?

I want to add the function of sticking the featured posts on the top in the first page. I found this - Custom Featured Post Styling, but this method can only sticky the posts on the top of that page which the post originally display due to the context limitation.
The {{#foreach}} helper does not perform queries, and can only operate on the data available to it in the current template scope. You can find out what data a template has access to by looking it up in the context table.
For example, if there are 3 pages and the article test is displayed on the page 2, then I mark it as featured and check the first page, however, test won't be displayed on it.
My question is: how to sticky all the featured posts, no matter where they originally display, on the top of my first page?

Create an Apex form with multiple pages

I'm trying to make an apex form that has multiple 'pages' within it, so that I can achieve a nice layout.
For example:
Page 1 - Personal Details >> Page 2 - Occupation >> Page 3 - Career History >> Submit
Is there a way to do this without submitting one page at a time as this would mess up my validation for the table entry.
It's kind of a broad question - lots of possible solutions. You will need to create several regions on the page, so that you can easily show or hide different sets of page items without submitting the page.
If you simply want to keep the page tidy, you could make use of the Hide and Show Region template, or you could create a Region Display Selector region.
To help the user experience flow a bit better, I would probably do something like this:
Set up the page items using the Form wizard.
Create three HTML regions - Personal Details, Occupation, and Career History.
Move the page items into the appropriate regions.
Delete the original region created by the wizard, together with the default buttons.
Create navigation buttons in each region - probably a Next button in Personal Details, Next and Previous buttons in Occupation, and Previous and Submit in Career History.
Create dynamic actions for each of the buttons. The Submit button submits the page of course. The Next and Previous buttons show and hide the regions as appropriate.

Partial refresh of JSF page using ui:repeat and AJAX

I have a page say "Main Page" (Page 1) which looks like a Outlook calendar page having a large number of rows displayed using . Actually, the columns represent "Weeks" and the rows represent "Products". The functionality is that the user can choose a product week combination and create offers for the chosen week.Ideally, as we have a lot of rows (products), we should have ideally implemented pagination but we have not.
We use JSF2 (Mojarra faces that comes with JBoss EAP 6.0). Main Page uses a different bean and Details page uses a different bean and both are in session scope.
When the user creates an offer, instead of refreshing the entire page (i.e. Page1), we just refresh the impacted cells using AJAX. However, the On double clicking the slot(offer), we redirect to a different page (Page2) that displays offer details.
Page 1 - Main Page and Page 2 - Details page.
There are 2 cases from here :
Case 1: User goes from Main page to the details page, just views information on the details page and clicks the close button. In this case, it is enough for me to display Main Page as it was before I opened the details page. To achieve this, we used browser history.back(). However, we faced the below issues :
(a) history.back() works only in Firefox and does not work in Chrome/IE.
(b) Even if we do history.back(), the page loading is cleary visible and as our page is heavy, it takes a few seconds. I would like to avoid re-rendering of main page again (i.e. make it look like opening a popup from the main page and closing it)
Case 2: User goes from Main Page to Details page and makes certain updates which require us to reflect those updates in the main page.(For example: change color of the slot from red to green on the main page).
Currently, when Details page is closed, we call an API that provides us with refreshed data (so that we do not need to maintain the list of actions that the user had performed) and we reload the entire Main page (Page1). However, as the page takes a long time to load, we are asked to refresh only the affected slots/rows.
So, the problem here is that if we have to achieve the refresh of Main Page through AJAX, we need to maintain a list of activities that has been done on the details page and feed it through AJAX which appears to be a complicated activity. (We also want to avoid calling the API.)
Is there any workaround which helps us to refresh only the selected rows on the Main Page to minimise the page load time. Can ui:repeat be partially re-rendered ?
PLease advise.

Interactive elements of a web page

I was wondering if we have to consider interactive elements of a web page which are basically changing a section of a web page as a new level when making a site map. For example, I have a web page "x" with edit, new, delete function button. Clicking on these buttons changes only a specific part of the page which is associated which is a constant area in itself. The parts of the web pages which don't change are the top navigation, footer etc. While thinking of a site map I wasn't sure if clicking on features like edit would be considered a new level since the web page is the same.
No, interactive page elements would not be considered part of a site map.
The page they reside on would be placed on the site map, but that is it.
A site map is meant to record the hierarchy and individual pages of a site... the things a person can navigate to.
Interactive elements would not fit this unless there are several different bits on one page and those bits can be reached by anchors.

Resources