how to comment code blocks (that you want to remove)in the code page word press - hook

I need to disable best selling featured products etc.
</main><!-- #main -->
</div><!-- #primary -->

You have two ways to do that. Here is an example
<!--div>Here are some elements</div-->
Another way is :
<?php /*echo "<div>
Here
are some
details
</div>" */;?>

Related

How Can i add the customized section to home page in broadleaf

Hi I am new to broadleaf and i want to add the customized products to home page of broadleaf like the home page will load two cateogries of products at at time for example the home will want to load top sale products and hot sauces.
Please help me to Solve the issue.
Thanks in Advance
First off, i am not that experienced with broadleaf either, but my background has made it pretty easy for me to wrap my head around ( i think), and there are a quite a few different ways to do this and it really depends on how you ultimately like to maintain the lists, and your experience level.
As you have said you are just getting started, i'll give you what i think is the most simple way to do this.
First, assuming you are working from a recent version of the demo site. In this case, the home page is actually just a category with a custom template. If you look in the Admin app at the "Home" category and select the "Products" tab, you will see a list of the 4 Hot Sauces that are displayed on the home page in the Demo store.
The important thing to note here is that it is specifically not the "Hot Sauces" category, it is a specific subset that is selected in the admin app, giving you control of the not only the items displayed but the number of items displayed.
If you have seen the code in the homepage html template, you will see something like:
<div class="row">
<h3 class="text-center">
The Heat Clinic's Top Selling Sauces
</h3>
<th:block th:if="${products}" id="products" class="group" th:each="product : ${products}" th:object="${product}" >
<div class="col-sm-6 col-md-3" th:if="${product.isActive()}"
th:include="catalog/partials/productListItem">
</div>
</th:block>
</div>
This is the code in the demo site that is displaying the list of hot sauces on the home page. The CategoryController retrieved ths list of products for the category and put them in the Model.
Now, the absoloute easiest way to add a second list of products to the home page is use the same technique. In Admin look at the "Marketing" tab, you will see the same list of 4 products in the "Featured Products" section. As far as I am aware this is not actually being used in the new versions of the demo site. Note that there is also the upsell and xsell product lists, but for this purpose i am just going to use the Featured Products list. I suggest you change these to some other products now just so you can see the changes to the home page are pulling the correct list later.
In homepage.html insert something like the following code (it's similar to the code you looked at above):
<div class="row">
<h3 class="text-center">Top Selling Products</h3>
<th:block th:if="${category?.featuredProducts}" id="featuredProducts" class="group" th:each="featuredProduct : ${category.featuredProducts}">
<div class="col-sm-6 col-md-3" th:with="product=${featuredProduct.product}" th:object="${featuredProduct.product}"
th:include="catalog/partials/productListItem">
</div>
</th:block>
</div>
And your done.
This is certainly not the only way, or even the best way, unless your definition of best is "It takes 5 minutes and 6 lines of HTML".
At some point, depending on how your requirements pan out, you may end up creating a specific HomepageController, this approach should still work in that case, without customising the admin interface, as long as the data is still put in the model by the controller.
FYI: The homepage template is located at site/src/main/resources/webTemplates/layout/homepage.html

Kentico - Dynamic Page Title Not Display Correctly in Smart Search Results

I used {% CurrentDocument.DocumentName %} in the Metadata > page title field. The Title tag displays ok when viewing the article itself on the browser; however, when searching through Smart Search, the results output something like below in place of the Title. I'm not sure why, is there a way to fix this? Thanks!
{% CurrentDocument.DocumentName |(user)myLogin|(hash)9f2b69705f777e8a884a107dfb72f681d8eb99867b6967514dbdca851b7f4309%}
Note: This is for hundreds of article pages, and inheriting Page Title from Parent by using the macro work best for me.
What is your transformation for search results? How do you retrieve that value?
I can see two possible approaches to solve your issue:
go to page type -> search fields and select DocumentName as a value for Title field
adjust search results transformation and use <%# GetSearchValue("DocumentName") %> instead of <%# Eval("Title") %>
This is most likely because the user who signed the macro is not in the system any longer. I'd change the macro to simply read:
{%CurrentDocument.DocumentName#%}
Having the # at the end will say the macro does not need to be signed.

Sublime text 3: Using the same tab stop twice without cloning the word

I'm currently using the same tab stop twice in order to select two elements that are linked together. If the feature these two control is not needed, then neither one needs to be there.
That said, the tab stop does indeed select both areas it is supposed to, "$1:{ }", but when used - it shows the "mw_hide" in both spots.
What I am trying to do is use that tab stop, but keep both words.
So it should show "mw_hide" and "isMobleEle" when the tab stop is selected, rather than showing "mw_hide" in both places.
Before anyone says it - naming them both "mw_hide" is not an option in this case unfortunately.
All that said, does anyone know if this is actually possible?
(Code below)
<snippet>
<content><![CDATA[ <!-- ********** FW - Full Hero ********** -->
<div class="isMobile ${1:mw_hide}">
<!-- Place A -->
<div class="grid1">
<a href="URL" coremet="This${2:StayMobile}">
<img src="//img/setA/${1:isMobleEle}" alt="${3:AltTextHere}" />
</a>
</div>
</div>]]></content>
<!-- Optional: Tab trigger to activate the snippet -->
<tabTrigger>MOB</tabTrigger>
<!-- Optional: Scope the tab trigger will be active in -->
</snippet>
No, this is not possible. Instead, use different field id numbers ("tab stops"). If two different fields have the same identifier number, anything typed in that field will be identical in both places, unless you're altering it with a substitution.

How to make a page slides into a subchapter after clicked

please, I'm writing a very long text (chapters) and I would like to make an index, example :
A chapters - B chapters - C ... when make click on (A)...page slides down up to (A chapters ) area
Please, how make this, and how is called this technique for future use not forget.
Thanks in advance.
give the element you're sliding to an indiovidual id like "chapter1"
<div id="chapter1">
ONCE upon a time, blablabla
</div>
and an anchor targeting to this div
<a href="#chapter1">
Chapter1
</a>
Your can simply access to this chapterwith a link using it like so :
http:/yourwebsite/yourtext.html#chapter1

How to add menu items to the Communities menu in IBM Connections?

I wish to add a new menu item/link (e.g. "Stack Overflow") at the end of the menu in the screenshot below.
The new link URL would end in the community_uuid e.g. http://example.stackoverflow.com/some-page#community_uuid
Is there any good documentation available to show how this is done?
Immediately I thought of three things:
1 - Custom CSS for a community, so you could somehow add/change or maybe create a landing spot for a dom manipulation event which adds it.
In order to change the CSS, You should look at:
http://infolib.lotus.com/resources/oneui/3.0/docPublic/components/menu.htm
It's the navbar role.
In a folder such as /local/con/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/conServerCell/Communities.ear/comm.web.war/nav/common/styles/orangeTheme/
2 -
You may also want to look at /local/con/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/conServerCell/LotusConnections-config/widgets-config.xml
specifically
you could add a StackOverflow widget, when loaded it automatically opens up a new window, and transfers the person back to the previous page. ... a little bit of a kluge...
3 - Look for /local/con/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/conServerCell/Communities.ear/comm.web.war/nav/templates/page.jsp
find the line
<div class="lotusMenu" id="lotusMenu" style="display:none;" role="navigation" aria-label="Main navigation"><div class="lotusBottomCorner"><div class="lotusInner">
<div id="lotusMenuTree"></div>
</div></div></div>
You could modify the very end to add some custom link for you.
Just some quick thoughts...

Resources