Magento new products widget shows new products twice - magento-1.9

I've added a widget to my Magento (1.9.x) homepage Page by adding this to the content source:
{{widget type="catalog/product_widget_new" display_type="new_products" products_count="5" template="catalog/product/widget/new/content/new_grid.phtml"}}
My new products show up, but they are displayed twice, in two separate HTML blocks. After investigating I can see that it is using both these templates (once after the other):
app/design/frontend/mytheme/main/template/catalog/product/new.phtml
app/design/frontend/mytheme/main/template/catalog/product/widget/new/content/new_grid.phtml
Any ideas why?

It turned out that, in the homepage Page, I already had some "Layout Update XML" defined in my Design for the Page. Not sure why it hadn't showed up until after I added the widget code above to the Content, but I removed it and that fixed the issue.
In the end I actually found & used this http://docs.magento.com/m1/ce/user_guide/cms/widget-new-products-list.html which looks like a better way to do New Products on the homepage anyway (it allows better non-dev admin control).

Related

Duplicate elements after clicking in a repeater list item

I've an issue after clicking in repeater list item, I get two items in the detail page instead of one element.
This repeater is for Booking elements and I've added the follow transformation: "Transformation" and "Selected item transformation".
The "Selected item transformation" is applied but I get two elements in the page after apply this transformation.
I tried to add a data list and instead of to get two elements after clicking on an element I get four.
I'm new in Kentico maybe it is a configuration issue.
Below I detail the configuration for the repeater web part:
Content/Path:/Events/%
Content filter/Page types: CMS.BookingEvent
Content filter/Category name: {%SiteContext.CurrentCategory.CategoryName#%}
Do you have any idea about what can be the problem?
If you need more information please let me know and I'll send you.
You can check following below things
Does the listed page & detail page uses same page template (is it inherited)?
Need to check Selected item transformation, is it setup right?.
For testing you can remove category filter and then check.
Make sure are you using <%# GetDocumentUrl() %> in list page Transformation
Thanks
Does the listed page uses same page template (is it inherited)? Do you have just one repeater on that page?
The selected item transformation renders on target page (detail of listed page) but the page needs to use same page template (or inherit the one that is on parent page listing page)
Alternatively, don't specify selected transformation and make the repeater on target page to display just its properties.
Check list and details pages. In your case details page should inherit template from list page.
Your repeater is responsible for showing list and details, so make sure there is no extra web part (another repeater or any other viewer) that shows details only.
Also try to check Hide on child pages setting in your repeater - this will help you to figure out if repeated renders 2 details (in case no details shows now) or there is another web part for details (in case only one item details appear now).
This page is using the selected item transformation correct? And this happens when you are navigating to the event page (/Event/CustomEvent1)?
Does this happen for every event? Does the event page url have any special characters in it? I have had an issue before if the page has an _ in the name and url, it will break the repeater. This was fixed in a hotfix in K9.
If you are still running with this issue, I'd suggest to remove SelectedItemTransformation and display detailed content on specific document i.e. /Event/CustomEvent1. You can use either repeater for read current document only and set detailed Transformation in "Transformation" property itself DON't use "SelectedItemTransformation" in this case.
Thanks so much for all the answers, they were pretty useful for me.
The problem was related with the inherited template. In my "Listed page" on template tab I chose the option "Clone template as ad-hoc". I've checked in the detail pages that the template option was in "Inherit from parent".
I realized too that in the root template which I've used in the "Listed page" there were a repeater, then I removed it and the problem was fixed.
Thanks so much again.
Kind regards,
Max

Changing page title as it appears in MediaWiki category

I've been trying to use DEFAULTSORT to sort pages based on a template parameter instead of the page title. This is how it appears at the top of the template:
{{DEFAULTSORT:{{{Username}}}}}
This is how it appears after the argument is transcluded:
{{DEFAULTSORT:d3xus}}
It would be nice for it to appear in categories as d3xus and not D3xus. There's no change in how the page is sorted because they both begin with the same symbol. Using an extension or magic word, is it possible to change how a page appears when viewed in a category? DEFAULTSORT only changes how the page is sorted with respect to other pages in the same category, but it does not change the page title in the category.
That's actually impossible without a bigger change in the code. There is a task for it in Wikimedia's bug/feature tracking software Phabricator: T19212, but it's actually stalled :(
There is no such thing. If you want to change the page title regardless where it is displayed, you can use $wgCapitalLinks or {{DISPLAYTITLE}}.
Actually it seems there is such a thing: Extension:Semantic Title. It is very hacky though (and you need to install Semantic MediaWiki).
Try this:
Method 1: Add to your MediaWiki site: {{DISPLAYTITLE:d3xus}} and [[Category:d3xus]].
Method 2: https://www.mediawiki.org/wiki/Extension:Semantic_Title

Blog component doesn't work properly when change the name of page in AEM 6.0

I'm working on blog component of AEM 6.0. the problem is when i change the name of parent page i.e blog from blog to blog1 then other components of blogs like pages, authors,archiving stop working . No data comes in these components and if i change the name from blog1 to blog they again work properly. Is there any hardcoding is done for blog name ? if yes can you please specify if i want to change the name of blog how can i resolve it ?
I have similar issue and raise discussion on Adobe Forum
http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__hmrl-hi_gents_i_faced.html
My investigations shows that to generate authors,archiving,tags AEM6 uses Lucene search through /var/search-collections/ugc-blog-search that is not updating properly on changing content.
If you are using only components from the box try to modify you content via pageManager e.g. copy
pageManager.copy(pageManager.getPage('/content/geometrixx/en/blog'), '/content/geometrixx/en/blog_pm' , 'blog_pm', false, true);
That may help. In case you are working with custom components based on SCF API it is still unpredictable behavior.

Headings created inside of a template

I have a number of templates that create headings based on a formula. I am wondering if there is anyway to create an "edit" link that will take you directly to that section? The way that it currently works, the edit link takes you to editing the template itself. Could I possibly create a customized link that would keep you on the page and take you to right part?
Here is some sample code to help clear things up...
Template:Head:
==={{{1}}}===
This is a heading titled "{{{1}}}"
Test Page:
=Section 1=
{{head|1.1}}
{{head|1.2}}
{{head|1.3}}
=Section 2=
{{head|2.1}}
{{head|2.2}}
{{head|2.3}}
At the moment, if I want to edit the information for template "2.3", I have to edit all of section 2. (Note that for this example, that isn't a big deal. For the actual templates I am working with on my site, the templates have dozens of parameters and there are sometimes 10 or more in a section.)
Bottom line, is there way to create a custom edit link inside of the {{head}} template that would take you directly to editing the templates call on the page "Test Page"? Hope that makes sense.
Edit: Is there perhaps a way to make use of "anchor" tags? Can anchors be passed in to the URL?
To restate your problem, when you transclude a section heading the header isn't treated as being part of the destination page, so the edit link takes you back to the source. So you need a separate container for the template in order to edit it individually, and a complete section is the smallest editable container.
The only way I can think of doing this is using subpages (or virtual subpages if you don't have that ennabled in this namespace, doesn't change anything). So instead of placing {{head|1.1}} on MyPage, put it on MyPage/Subpage1 and then transclude that into MyPage in the usual way ({{:MyPage/Subpage1}}).
{{head}} can then include a custom edit link to the template input by using HTML heading tags (<h2> is equal to ==, etc.) to suppress the standard edit link and then use one of these templates (probably {{ed right}}) to create a custom edit link pointing to MyPage/Subpage1.
The way to create anchors in Mediawiki, by the way, is to use a <span id="name"/> tag, but that doesn't create a container that can be edited (or at least, not that I've been able to work out through URL tinkering).
I'm pretty sure there's no way to do that. As far as MediaWiki's section editing feature is concerned, the only thing that begins a new section is a line of the form:
=== Some text here ===
with the number of = signs determining the level of the heading. There's no way to get MediaWiki to let you edit any segment of the document that doesn't begin and end with such a line (or the beginning or end of the page).
Well, OK, I'm sure you technically could do it with an extension, in the sense that you can do anything with a MediaWiki extension. All you'd need to do is provide some way (e.g. a special parameter in an edit URL) for to user to indicate "I want to edit this template", then extract the template from the wikitext, present it to the user for editing, and write the result back into the page text over the original.
The tricky part will be extracting the template from the page source. (Finding and replacing templates on a page is a fairly common task for MediaWiki bot writers, so you might want to look for ideas there.) Whatever method you end up using for that, there will probably be edge cases where you need to give up and tell the user "Sorry, but I can't figure out how that template is transcluded here."

SalesForce.com Display image in S-Control

I need to display an image in an S-Control is SFDC. I would like to be able to reference a static resource like <apex:image url="{!$Resource.TestImage}" />, but that only works in VisualForce pages and I have to modify and existing S-Control (switching to VF is not an option).
What's the best way to accomplish this, so frustrated with the general lack of documentation and hackishness of SFDC development.
Thanks all
You can upload your image to Documents tab and later use normal <img> tag to display it on S-Controls, Visualforce pages and email templates (last one - if this will be an "externally available image"). The generated URL to view it will look somewhat like
https://c.na7.content.force.com/servlet/servlet.FileDownload?file=015A0000001IFxZ
(my test org sits at na7.salesforce.com instance and the last part is gnerated object's ID)