Kentico - New fields on existing document types won't render - repeater

In Kentico 7, I added 3 new fields to the Page (menu item) document type: small_desc, long_desc and icon_class - this is in addition to the existing fields MenuItemID, MenuItemName and MenuItemTeaserImage.
On a Repeater WebPart I added the following transformation:
<li class="...">
<a class="<%# Eval("icon_class") %>" href="<%# GetDocumentUrl() %>">
<%# Eval("MenuItemName") %>
</a>
<p class="..."><%# Eval("small_desc") %></p>
</li>
A strange thing happens. While viewing the page with the Repeater in Preview mode, everything renders correctly:
<li class="...">
<a class="unique_class" href="/url.htm">
Document Title
</a>
<p class="...">A description I just added to the document.</p>
</li>
But in Live mode, I see:
<li class="...">
<a class="" href="/url.htm">
Document Title
</a>
<p class="..."></p>
</li>
So...
We've run through a plethora of troubleshooting steps...
there are absolutely no exceptions in our Event Log
everything is checked in
server cache cleared
application restarted
browser cache cleared and hard reloaded on multiple browsers and machines
My assumption was Kentico didn't like it when you add new fields to existing (Kentico default) document types. I cloned a completely new document type earlier, added all brand spanking new fields, ran a repeater on a list of new documents, and every single field showed up. I'm certain I could do that - just clone Page (menu item) and recreate all of my pages, but for (I hope) obvious reasons I'm not going to do that. Kentico Support hasn't been able to give any good direction so I turn to you smart folks!

What are the columns set in the repeater's Columns property? Isn't it possible that there are set some of them and you are missing the new ones? If it is blank, all the columns should be loaded (not good for performance though).

Related

Load django template dynamically

I've 2 section in my screen. Left section is for showing tabs and right is for displaying that tab template(as shown in screenshot). I'm not able to understand how to load different templates when I click these tabs
For example, when I click change password, I should be able to load change_password.html template
This is by far I've tried with code.
<div class="nav">
<ul>
<li class="active"></i><span class="hidden-xs hidden-sm">Home</span></li>
<li></i><span class="hidden-xs hidden-sm">Change Password</span></li>
<li>Bookings</span></li>
<li></i><span class="hidden-xs hidden-sm">Settings</span></li>
</ul>
</div>
I've tried to use with but no luck.
I've just started with django, so if anything is missed let me know. Thanks for your help!
Screenshot
I think what you're attempting is not possible. If you don't want a page reload upon clicking on a tab, you need to use Javascript to dynamically show/hide elements. If page reload is acceptable, you can create different views for each tab, each view rendering a different html file.
You can use the Django include tag to render another template with the current context. E.g. {% include "foo/bar.html" %} (see documentation here). But this will not solve your problem of displaying different content upon clicking on a tab.

Sitecore Web Forms for Marketers, add info to the display-section-legend class

We are on Sitecore 8 using Web Forms for Marketers.
I am trying to identify how to add information to the "display-section-info" class item in a sitecore WFFM form. Looking # The generated code I see an element (display-section-info class) after the Field Legend, and before the starts of our fields. I would like to put some basic information regarding the fields in this element (below has text "THIS IS WHERE I WOULD LIKE TO ADD TEXT").
Here is the source from "View Source" on the browser. Through developer tools I plugged in some info and that is exactly where I want it to go.
<fieldset class="display-section-fieldset">
<legend class="display-section-legend">1. OUTSIDE INTEREST:</legend>
<p class="display-section-info">THIS IS WHERE I WOULD LIKE TO ADD TEXT</p>
<div class="display-section-content">
<div class=" field-border">
<span class=" field-title">
<span class=" field-required">*</span>
In the field below, list exceptions
</span>
Update1:
per Jammycans response I added a few parameters to the section but did not seem to display. items have been published, I also confirmed on the prod DB.
Content Editor
Results:
Thanks in advance
There is no field in the Form Editor to set this information, you can set it directly on the section item itself.
In the Content Editor, expand the form and select the Form Section item. On the section item in the Parameters field set the information field text you need:
<Information>THIS IS WHERE I WOULD LIKE TO ADD TEXT</Information>
You can use the Localized Parameters field if you need to translate the text.
EDIT:
There is a bug in the logic on the default WFFM section view, located in \Views\Form\EditorTemplates\SectionModel.cshtml (for Sitecore 8 update 5 and earlier). On lines 18-21, the code reads:
#if (string.IsNullOrEmpty(Model.Information))
{
<p class="#Model.CssClass display-section-info">#Html.Sitecore().Field("Information", Model.InnerItem)</p>
}
The first line here should read:
#if (!string.IsNullOrEmpty(Model.Information))
Note the "!". That explains why you were seeing the markup previously, even though the parameter was not set. You need to update the code in the view in order to fix it.

Selenium Python click a link to javascript in an unordered list

I'm trying to click and activate the javascript link with Selenium. It's for a 5 star rating widget.
five-stars is the exact item below. The other items, IE 4 star are not fully shown.
<div id="percentages_and_ratings">
<div id="percentages">
<div id="rating">
<ul id="personality-rating" class="star-rating profile_rating " onmouseout="Votes.publicStarOut(this)" onmouseover="Votes.publicStarOver(this)">
<li id="current-personality-3198779465475184989-1" class="current-rating" style="width: 0%;"></li>
<li>...
<li>...
<li>...
<li>...
<li>
<a class="five-stars" title="" href="javascript:processVoteNote('vote', 'personality', 5, '222222222222222', false, '', '', Profile.profileHeadingVote);">5</a>
</li>
<li class="cant-tell" style="display: none;">
<li class="click-away">
The selenium unit test output looks like
driver.find_element_by_xpath("(//a[contains(text(),'5')])[2]").click()
but that doesn't work. Selecting the xpath, CSS, HTML with firebug doesn't work either. Any ideas? I've been at it for a few nights now so it's time to ask :-)
I'm using Selenium web driver and python 2.7
Here is how I ended up solving it..
id = self.getID(driver)
script = "$(processVoteNote('vote', 'personality', 5, '"+id+"', false, '', '', Profile.profileHeadingVote));"
driver.execute_script(script)
Based on the sample HTML you posted,
browser.find_element_by_class_name('five-stars').click() should successfully select and click that link. If there is more than one element on the page with that class name on the page, you could use browser.find_elements_by_class_name('five-stars'), iterate through that list to identify the relevant links, and then click them.
If you want to use an XPATH search, I'd recommend using xPath Tester to try out different patterns.

Incorporating slideshow / carousel into custom tumblr theme

Got a very particular problem here:
I've been developing a tumblr-hosted site locally, using the API to pull in posts without having to copy and paste the project into tumblr a million times. I decided I liked the API better and would just use that in production, but now that it's time to deploy I realize that I have to go back to the custom theme, {block:Posts} method.
I have the post feeding into a Cycle2 slideshow, with 3 slides containing 3 posts each for a total of 9 playlists viewable without going back to the archive. This method works perfectly with the api, but is getting messed up in the custom theme. Here's my current code:
<div class="cycle-slideshow">
{block:Posts}
{block:Text}
<div class="slide-wrapper">
<div class="post">
{block:Post1}
{block:Title}<h2>{Title}</h2>{/block:Title}
<div class="blog_item">
{Body}
</div>
{/block:Post1}
</div>
<!--two more posts before end of slide... -->
</div>
{/block:Text}
{/block:Posts}
</div> <!--end of slide wrapper - 2 more of these before end of slideshow div..
I also tried scrapping the post numbers, but still no dice. In tumblr's docs, they say that
Example: {block:Post5}I'm the fifth post!{/block:Post5} will only be rendered on the fifth post being displayed.
I'm wondering if "being displayed" refers to the html visibility of the post, and if so, if that's interfering with the cycle plugin? The results are one ill-formatted post per slide, and then after cycling through 2 blank slides, the next oldest post takes its place. I'll be pleasantly surprised if anybody has ever had a similar problem but I would kill for some advice. Here's the development site for reference (and the second carousel is working because it's still hooked up to the api). thanks!!
Generally speaking, the following code is what you'd want to have 3 slideshows with 3 posts each.
Note that in the Additional Settings on the Customize screen, you'd have to set the post count to 9 per page in order for this to work properly. I wrapped it in an Index Page block, otherwise this is going to look nasty on a Permalink Page.
{block:IndexPage}
{block:Posts}
{block:Post1}<div class="cycle-slideshow">{/block:Post1}
{block:Post4}<div class="cycle-slideshow">{/block:Post4}
{block:Post7}<div class="cycle-slideshow">{/block:Post7}
<div class="slide-wrapper">
{block:Text}
<div class="post">
{block:Title}<h2>{Title}</h2>{/block:Title}
<div class="blog_item">
{Body}
</div>
</div>
{/block:Text}
{block:Photo}
...
{/block:Photo}
...
</div>
{block:Post3}</div>{/block:Post3}
{block:Post6}</div>{/block:Post6}
{block:Post9}</div>{/block:Post9}
{/block:Posts}
{/block:IndexPage}
However, if you're wanting 3 slideshows with the post types split between the slideshows, the code would look more like the following.
Note that in this scenario, if you were to have 4 texts posts out of 9, all 4 text posts would end up in the Text slideshow. You'd have to use Javascript or CSS to remove or hide the additional posts if you're very strict about your 3.
{block:IndexPage}
<div class="cycle-slideshow">
{block:Posts}
{block:Text}
<div class="slide-wrapper">
<div class="post">
{block:Title}<h2>{Title}</h2>{/block:Title}
<div class="blog_item">
{Body}
</div>
</div>
</div>
{/block:Text}
{/block:Posts}
</div>
<div class="cycle-slideshow">
{block:Posts}
{block:Photo}
<div class="slide-wrapper">
...
</div>
{/block:Photo}
{/block:Posts}
</div>
{/block:IndexPage}
If you need me to clarify anything, let me know.

can't add a link to an entire div section

I have a problem with TinyMCE in Joomla 2.5.4. I have tried for a few days now to add a link to a div section (like <div> something< </div> ) but failed, the anchor is stripped from the HTML section because TinyMCE sees that as being wrong in HTML4. After a 3 days research I gave up and instead of a div i used a unordered list.
Now when i try to add a link to a list item (like <li> <p> something </p> </li> ) TinyMCE rearranges everything and moves the anchor inside of the list item (like <li> <a href="#"> <p> something </p> &=lt;/a> </li>).
I have tried pretty much everything from valid_elements : "[]" to text filter: No Filtering but i ran low on ideas.
Can anyone please help me?
Try playing around with TinyMCE's html5 options: http://www.tinymce.com/tryit/html5_formats.php
Hit "view source" to see how they're doing it. It's mainly this option inside tinyMCE.init:
schema: "html5",