Adding a custom product listing CMS block in shopware 6 - shopware

I try adding a custom CMS block for product listing in shopware 6.
I can create other blocks for example image,text,... for those i don't have any problem.
But about product listing i have problem.I do the steps correctly according to this document
But in admin panel i can't see My CMS block product listingi have only default product listing .
Also for test i change value hidden:true in sw-cms/blocks/commerce/product-listing-exam/index.js with this value my block appears.But doesn't work.i can use of my block in shop page layout type but i need use this in listing page layout
There is my source code : link

How did you created the image/text elements, did that work without problems? I created a cms block according to the documentation, but the block does not appear in the block list. There is a file in public/administration/js folder in the example plugin. Do you know what that does? Maybe the problem is because of that.

Related

Magento 2: Get store country full name in CMS pages

I want to show the store country full name in a CMS page.
When using:
{{config path="general/store_information/country_id"}}
It's only showing the 2 letter code. Like "FR".
But I want to show "France".
For phtml/php you can use this solution.
But how to solve this for CMS pages and Blocks?
Not the most elegant solution, but you could create a PHTML file from the solution you linked to, then call that from inside your page/static block with {{block class="Magento\Framework\View\Element\Template" template="Vendor_Module::myfiles/myfile.phtml"}}.

Drupal how to add a search filter to admin content page

I've never used Drupal before (development or managing content). I was asked to extend the admin content page to have a filter and simply don't know enough to get moving quickly.
Can anyone tell me if adding a search by text filter in the admin content area requires code or is there a CMS feature like adding a node for this task.
If code is required, is there something like a hook for this area? Not sure where to start. I will be investigating on my own but pointers to get me oriented to Drupal would help.
By default Drupal provides search mechanism ready to use. But there are also additional module which can improve search experience. You don't need any coding to use that search. You already have search form block ready to use.
Go to Structure -> Blocks and find block called "Search form". Now all you have to do is to put that block in some region and it will appear on front-end. Of course if it's not already styled by your theme it may be needed to put some extra CSS to make it look nice. There are also some template files which you can override and put some your HTML if you need.
There's also template file for search results page (which of course will work out of box also).
You may also need to create new block region if you want to place your form at some specific place, not covered by any existing region defined by your theme (easy thing to do!).
See https://drupal.stackexchange.com/q/30633/101329, the "Admin Views" module lets you configure the search form as you like.

Displaying the search module on one page only

I have installed my smart search module which is working fine, I want to only have this on my page 'blog' which - as you might have guessed - is a category blog.
I have tried the following things:
Only assign on the pages selected, here I selected blog
On all pages except those selected, here I selected everything apart from blog.
Included the search module in my category description, this worked, however, then I had two search bars instead of one. Is there a way to do this without the search bar appearing twice?
The problem is that the search bar does not only show up on the category blog site, but also on all the blog posts. How can I make sure that it only shows up on the blog page?
If the article is accessible from the Category Blog menu item, i.e. it appears in articles listed in the blog it will inherit the module positions of the Blog menu item. Thats how stock standard Joomla generally works. At least I think that's the way it works out of the box.
The reason I'm unsure is that we've been using the Advanced Module Manager(on the JED) extension (free and paid versions available) for nearly as long as we've been using Joomla. Using that I know we can specify whether a module appears on child items.

ExpressionEngine single entry at segment 4 level

I have developed an ExpressionEngine website which has a news section. There is a news channel with categories, and the main news listing page is powered by a news/index template. The single entry (article) page is powered by a news/article template. You can see this section in action here: http://www.longbridgebirmingham.co.uk/news/. Everything's working great.
What I now need to do is list news in a very similar fashion within a subsection of the website (at segment 3 level). Here, to be exact: http://www.longbridgebirmingham.co.uk/life/community/news/. So far, I have created a new 'Community' category for the news channel and created a new community-news/index and community-news/article template which pulls in only Community news. I have used the 'Pages' facility to force this test page to use the community-news/index template: http://www.longbridgebirmingham.co.uk/life/community/news-new. Not sure if that's the right thing to do, but it seems to be working.
Now, I've been really struggling to find out a way to hook up the community-news/article template so that articles are presented at a segment 4 level: http://www.longbridgebirmingham.co.uk/life/community/news/article/url-title. Any help or advice would be really appreciated!
Thanks a lot in advance.
OK, so this is how I would recommend doing it.
you currently have your news template group which is fine.
Create categories for your news items, such as 'life' and 'community' and using the great Low Seg2Cat addon, you can then just use something like the following to filter based on the categories:
http://site.com/news/
http://site.com/news/category/
http://site.com/news/category2/sub-cat2a
This will allow you to use an unlimited number of categories and using Seg2Cat, you'll be able to filter based on the {segment_2_category_id} and/or {segment_3_category_id}.
Now, all you need to do is to append the article segment at the end if you want to show an actual article.
For example: site.com/news/category/article/url_title_of_entry/
EE, will automatically pull the article.html template from the template group.
Does this help?

Drupal 6: how to create a block that displays random images from a folder?

im trying to create a block that shows a random image from a pool of 20 in a dedicated folder, inside /files/. the first step i guess is creating a view that outputs a block. but afaik its only possible to display cck fields in this block, and not make it read from a folder on the server?
if not, what's the best way to go about this?
Finally, Id like to show this block only on pages that belong to a certain taxonomy term. In the admin for this block I can enter PHP that should return TRUE on pages where the block is to be shown. I'm just wondering - are taxonomy terms available here?
Best way is to make a small module for this.
The module will publish a block, and you will position this block wherever you wish on your pages. In the module's code, you will put the statements that will get the image and return a link to it.
Only thing, if you are using caching you will need to do some extra work, because the cache will prevent the random behavior: you can either disable it, or force a cache cleanup before displaying.
Here is the guide to do this: http://drupal.org/developing/modules
And here is specifically the task you need, the creation of blocks: http://drupal.org/node/206758
Take a look at http://code.google.com/p/fpss-drupal/
This a module for the popular FrontPageSlideShow for Joomla. It has a few themes but easily customisable.

Resources