Display portlets on search page in plone? - search

How can I add portlets to a plone search or search results page?
Using ##manage-portlets doesn't work (www.mysite.com/search/##manage-portlets), I get an empty search result.
I'd like to display the portlets of the root folder also on that pages, in my case the search column uses the whole page width.
I'm using plone 4.0.1.

Search results template has left and right portlet columns disabled (hidden):
http://dev.plone.org/plone/browser/Plone/tags/4.0.1/Products/CMFPlone/skins/plone_forms/search.pt#L19
If you want to display portlets there you should customize or override your search.pt template by removing the corresopnding line:
disable_column_one python:request.set('disable_plone.leftcolumn',1);
disable_column_two python:request.set('disable_plone.rightcolumn',1);
Anyway this will not let you set specific portlets for search results, as it's just a template opened in the Plone site root context. So you'll see Plone site root portlets.
The only way I think you could achieve that is:
Create a new special folder for search results (i.e. search-results).
Set your desired portlets in the new folder.
Set search as default page for that folder.
Modify search viewlet to redirect not to /search but to /search-results.
Modify search_form template (adavnced search) to redirect not to /search but to /search-results.
I did it once in a Plone 3 site and it worked. Although it wasn't to display special portlets.

Related

New pages in Kentico not listing in googlesitemap.xml

Here's the setup:
Root site, set up to show in sitemap and is searchable.
Page under it doesn't get listed in sitemap (in fact, no pages do).
Create a new page with options to show in sitemap and is searchable but is not listed in sitemap xml file
In fact, nothing shows in our sitemap except the location of the robots file.
I understand that initially it only lists CMS.MenuItem objects (as per https://docs.kentico.com/k11/configuring-kentico/search-engine-optimization/google-sitemaps).
Is there a setting I'm missing to show pages in the sitemap?
In case it's important: kentico version is 10.
Make sure your custom page types are configured in the code file:
Either in code before ~/CMSPages/googlesitemap.aspx or code behind ~/CMSPages/googlesitemap.aspx.cs
Since it's similar to a repeater you can set the ClassNames property to identify the different page types you want it to use for rendering.
e.g. when in code before: ClassNames="CMS.MenuItem;CMS.News;Custom.Type"
Resulting in something like:
<cms:GoogleSitemap runat="server" ID="googleSitemap"
TransformationName="CMS.Root.GoogleSiteMap" CacheMinutes="0"
OrderBy="NodeLevel, NodeOrder, NodeName"
ClassNames="CMS.MenuItem;CMS.News;Custom.Type" />

Kentico breakcrumb webpart not using the page alias

I have two pages sitting in a folder named "Auxiliary Nav". The pages have aliases set so 'Auxuliary-Nav' doesn't show in their URLs. I thought all was good until I looked at my breadcrumbs. Ideally, the breadcrumb shouldn't show "Auxiliary Nav".
I'm using the Breadcrumbs web part on a master page, but can't see a setting for this. I had also thought about just using the CSS list menu, but not sure if this would help me here.
Turn off "Show in navigation" for "Auxiliary Nav".

Custom search result page in shopware5

I need to create a custom search result page for my Shopware site. As I know custom pages can be designed only for detail and list pages.
However, after creating custom list page for my site with the name of “custom_listing.tpl” my search result page is still looks like the default list page of the site. How can I get rid of this default list page template on my search result page?
I tried to change the fuzzy.tpl {include file='frontend/listing/listing.tpl'} to my “custom_listing.tpl” but that did not work.
What you need to do is to create your own theme/template and activate it in the Shopware backend. Further you need to create your own frontend/search/fuzzy.tpl in your theme folder.
Now let your own fuzzy.tpl extend from the original one like so:
{extends file='parent:frontend/search/fuzzy.tpl'}
After that you will have access to all the smarty blocks that are defined in the parent fuzzy file and even in the frontend/index/index.tpl of which the parent fuzzy extends from.
Make your changes, deploy it to your localhost or webserver and after clearing the cache the search controller should autoload the overridden fuzzy.tpl with your custom search results layout.

Liferay Sitemap: Filter List of Layouts by SEO Settings

As you probably know, there is a Sitemap-Portlet in Liferay that you can bring into form using a Freemarker-Template in Portlet-Configuration.
Now in a normal Liferay Page under "SEO Settings" you can decide whether to include that page into the sitemap or not.
If you don't include it, it gets removed from the actual Sitemap (/sitemap.xml) but still is shown in the portlet.
Is there a way to access these "SEO Settings" (from freemarker code) so I could somehow filter by setting?
Thanks in advance!
Nevermind, I found out when looking into liferay database table 'layout'.
There is a column for TypeSettings which sometimes contained 'sitemap-include=1', so I simply checked it using layout.getTypeSettingsProperty("sitemap-include").

Need to have separate "complete" Drupal theme for each page on a site

I want to build a Drupal demonstration site where I can create several custom themes and display each on a separate page of the site. Access can be either via links or menu items. The "simpler" the solution the better.
Create a custom block that executes PHP code. The following code snippet should show the current page in the theme set in $custom_theme.
global $custom_theme, $theme;
// If $theme is set, init_theme() will not initialize the custom theme.
unset($theme);
// Set the theme you want to use.
$custom_theme = "garland";
init_theme();
There is also a module that allows you to change the used theme based on some rules (in example, the content type being showed, the URL of the page being viewed, etc): the project page is http://drupal.org/project/themekey.

Resources