Adding custom text to each Collection listed on homepage - text

IN BIGCARTEL: Is there a way to add CUSTOM TEXT to each individual collection that is displayed on the home page? I want this text to only appear when the collections are listed on the home page and not anywhere else.
Adding the additional text to the collection name in the product section does not solve this.
Adding a custom HTML on the homepage appends the same custom text to all collections. Again not right.
Any advice on creating a text that appears only with a particular collection, and only on the homepage?

If you are using JavaScript, try this:
if(~window.location.pathname.indexOf('index'){
// your code
}
The code above will run it only on index.html, which is your homepage.

Related

Kentico custom page url with URL "Path or Pattern" feature

Updated: As I put in the comment under Brenden's response. I think the issue is not related to multilingual site, but it's with using Properties/ URLs / Path or Pattern feature. After adding value to the field Path of Pattern, the whole navigation stops working properly.
I have a multilingual site (English, French). Currently the URLs are like below:
English: www.domain.com/en-us/contact-us
French: www.domain.com/fr-fr/contact-us
What I want for French is a custom (translated) url www.domain.com/fr-fr/contactez-nous
I followed this Kentico instruction - the bottom part of the page with using Path or Pattern by adding /contactez-nous in the box. Things seem ok, but upon clicking on the page with the new URL on the French site, the whole main navigation (done with Hierarchical Viewer) seems to stuck with that URL; clicking anywhere on the nav doesn't do anything.
Links outside the nav works fine. How to make the nav work again. Thanks for your help!
I think I got it. The GetDocumentURL() is using NodeAliasPath to determine the URL. However, if you have not specified the NodeAliasPath column in the Columns property of the hierarchical viewer, then the current page's NodeAliasPath is used - and thus all items have the same URL. Adding the NodeAliasPath to the Columns property should fix the issue, so the hierarchical viewer has access to the data of each individual item.
EDIT: it looks like that in some cases the DocumentURLPath column must be specified too.
Make sure you're testing this in another browser or even another browser in a private window. If you are testing in a new tab in the same window, the CMS caches the selected language in the Kentico UI and shows that in the browser window.
For instance, if you have selected "French" on the pages app in the bottom left under the content tree, then navigate to your site in a new tab, it will display French no matter how many times you change the language selector on your public site to a new language.
Secondly, check the URL aliases for the given pages in each language. Make sure you don't have an alias that is the same in each language. For instance /contact-us with French and /contact-us in English.

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.

Orchard - access a content type through different URLs so they use different views

I'm trying to create a CSS documentation library in Orchard. I want to save a description, CSS snippet and HTML snippet against each content type. The first view would show the description and CSS and HTML code written out. The second view would show a preview of what the CSS and HTML look like rendered.
cssdocumentation.com/content/item1
cssdocumentation.com/content/item1/live-preview
I've created the content type and the first view. But I'm not sure how to create the second view. I can see if I can create the alternative URL I can use the Url Alternates module to create an overriding .cshtml
To create an alternative URL I've looked at the autoroute module but this only allows you to adapt a single URL (unless I'm missing something?) and I've looked at Alias UI but this forces me to manually create an alternative URL everytime I create a content item.
Is this possible in Orchard without writting too much C#? (I'm a frontend developer so I only dabble in the behind the scenes stuff)
Thanks for any help
Best solution is to do this within your own module. But as a secondary option instead of having a second page, combine this content with your first page and hide it with CSS. When the user clicks a button to navigate to the next step render the CSS/HTML result on the same page. You can do this in many ways, here are a few ideas:
Render the CSS/HTML result out straight away on the same page but hide it. Show it when the user clicks a button
using jQuery to render the result on the client side. More dynamic if you allow editing of the HTML and CSS.
Redirecting the user to the same page with specific url parameters which you can pick up in your alternate to modify the output.

Orchard CMS adding an additional HTML part to page content type?

I'm trying to break my body into pre content, content, and post content so I can inject ads and what not within my articles. The only HTML field module is broken for 1.4 at the moment and I can't seem to add additional body parts to the page. I'm having to create my pre content in the body, then cut the HTML into a pre conntent text field. And do the same thing for post content. There's got to be a better way to do this. Is there any way to have more than one HTML editor field in the page editor?
As I told you in another answer, you can configure the Text field to use HTML. Just add the text field, and then expand it in the type editor. There is a drop-down where you can choose HTML.

How Can I Use Shadowbox to Extract Text Only from Webpage?

I have an article set up in Joomla that displays Terms and Conditions for the site users. I would like this to show up in a shadowbox when a user clicks a link. Here is the current anchor text example:
Terms and Conditions
This works out great for displaying the entire web page, but what I would like to do is just display the article text on the page (plain with a white background). Is this in someway possible with shadowbox? If so, how?
If I'm understanding you correctly - you want to suppress the modules and other periphery from your 'page' when it is loaded in the shadowbox.
Add ?tmpl=component to the url of your link.
You can do this with a div element and css shadow effect.
How to show/hide div is explained here:
http://www.randomsnippets.com/2008/02/12/how-to-hide-and-show-your-div/
How you can add shadow is explained here:
http://placenamehere.com/article/384/css3boxshadowininternetexplorerblurshadow/
I believe there are some components to do this - but you may have to get creative to do it without pulling the whole page with an a href tag.
In the database there's a particular area that holds that specifically and you could write a little query to just pull that information specifically and put it in the shadowbox, but what that query would look like I'm not sure.

Resources