2151 Results
custom code only on 2 pages
...ontext-object/ta-p/9331) to specify a code to run only on two pages (based on URL). Context: we have a remarketing code snippet that we want to fire when a user goes to two specific pages....Solved567Views
Sign in to react to this post4Comments
- rwm11 years agoAdvisor
The page object doesn't support that. Instead, use the http.request context object which does have a url method. Using that along with the Freemarker contains built-in can do what you want. For example:
<#if http.request.url?contains("/t5/path/to/page1") || http.request.url?contains("/t5/path/to/page2")> <code for special pages here> </#if>Sign in to react to this post
3.4KViews
Sign in to react to this post0Comments
Big Data Reduction 2: Understanding Predictive Analytics
...bsp; Michael was voted a 2010 Influential Leader by CRM Magazine for his work on predictive social analytics + its application to Social CRM. He's a blogger on Lithosphere, and you can follow him&n...45KViews
Sign in to react to this post4Comments
LITHIUM.jQuery perform code with 2 seconds lag
Hi all, I have a problem with LITHIUM.jQuery. I want to slightly modify standard Litihum breadcrumbs by using javascript. I created special custom component in Litihum Studio for that. Here is t...Solved593Views
Sign in to react to this post2Comments
- DougS13 years agoKhoros Alumni (Retired)
You could wrap the breadcrumb in a div that is hidden (display:none) and then have your javascript un-hide the div after it has adjusted the breadcrumb.
Another approach you can take is to create a custom breadcrumb, using the freemarker objects we have for working with the breadcrumb (so all your logic is run server-side). Here is information about the freemarker breadcrumb context objects we have:
Method Description Example content.nav.breadcrumb.crumbs returns a list of breadcrumbs for the currently rendering page <#list page.content.nav.breadcrumb.crumbs as crumb> <#-\- do something \-->
content.nav.breadcrumb.css returns the main css class name for the breadcrumb component ${page.content.nav.breadcrumb.css}content.nav.breadcrumb.separator returns the character that is used to separate breadcrumb items ${page.content.nav.breadcrumb.separator}content.nav.breadcrumb.crumbs[i].text returns the localized text of an individual crumb ${page.content.nav.breadcrumb[0].text}content.nav.breadcrumb.crumbs[i].url returns the url to a page if an individual crumb is a link. This may return null, but you can check if it will be a link by calling the .link method ${page.content.nav.breadcrumb[0].url}content.nav.breadcrumb.crumbs[i].isLink returns true if the individual crumb is hyperlinked <#if page.content.nav.breadcrumb[0].isLink>\\ <#-\- do something \-->\\
content.nav.breadcrumb.crumbs[i].wrapperCss returns a css class for the li tag around an individual crumb. Will always return a string (never null, but possibly empty) ${page.content.nav.breadcrumb[0].wrapperCss}content.nav.breadcrumb.crumbs[i].css returns a css class for an individual crumb. Will always return a string (never null, but possibly empty) ${page.content.nav.breadcrumb[0].css}content.nav.breadcrumb.crumbs[i].separatorCss returns a css class for the separator character of an individual crumb. Will always return a string (never null, but possibly empty) ${page.content.nav.breadcrumb[0].separatorCss}content.nav.breadcrumb.crumbs[i].type returns a breadcrumb item type that this individual crumb fits into. Possible return values are as follows (and a breadcrumb will render links in the order below, from top to bottom): - community
- tkb (strange, special type b/c tkb breadcrumb links include a link to a main tkb page for the community)
- container_node
- leaf_node
- message
- pre_page_title
- page_title
${page.content.nav.breadcrumb[0].type}Here is an example of putting all of the above context objects together into a custom breadcrumb:
<div class="${page.content.nav.breadcrumb.css}}"> <ul> <#list page.content.nav.breadcrumb.crumbs as crumb> <li class="${crumb.wrapperCss}"> <#if crumb.link> <a href="${crumb.url}" class="${crumb.css}">${crumb.text}</a> <#else> <span>${crumb.text}</span> </#if> </li> <#if crumb_has_next> <li class="${crumb.separatorCss}"> <span>${page.content.nav.breadcrumb.seperator}</span> </li> </#if> </#list> </ul> </div>Sign in to react to this post
2.2KViews
Sign in to react to this post0Comments
Correct Reply Count with API 2
...ount) I get: 2. Using API 2 (SELECT count(*) FROM messages WHERE parent.id = '<id>') I get: 1. Now, I did this test because I was getting this mismatch on an existing topic and I f...Solved294Views
Sign in to react to this post2Comments
- cike10 years agoChampion
PerBonomi VarunGrazitti Using APIv2 you could query for the message count of the whole conversation:
SELECT conversation.messages_count FROM messages WHERE id = '<id>' AND depth = 0
The conversation.messages_count includes the original post. To get the count of all replies only you could simply do something like
<#assign true_reply_count = (messages_count?number - 1) />
Kind regards,
Christian
Sign in to react to this post
2.3KViews
Sign in to react to this post0Comments
1.9KViews
Sign in to react to this post0Comments