Divs and H tags inside of A tags - kentico

In Kentico, I am trying to put an image and an h3 tag inside an a tag in an Editable Text web part, but Kentico rewrites the code and splits the a tags, making 2 a tags, one around the image and one around the h3. How would I get this to stop?
Here is what I am trying to write:
<div class="brick">
<a href="/virtualvalley/studentresources.aspx">
<img alt="" class="img-responsive" src="/Virtual-Valley/document-library-(1)/images/default.jpg" />
<h3>Student Resources</h3>
</a>
</div>
And here is what Kentico rewrites it as:
<div class="brick">
<a href="/virtualvalley/studentresources.aspx">
<img alt="" class="img-responsive" src="/Virtual-Valley/document-library-(1)/images/default.jpg" />
</a>
<h3>
Student Resources
</h3>
</div>

Related

image get upload successfully in folder. it is not displayed immediately when that page renders

when I am uploading a new image its not displaying and giving 404 error. all previous upload image is displaying. it is not displaying immediately. when I off server then restart it display that.
I am using angular as frontend and node express setup at backend using multer for uploading images and mongodb as db
I have checked all paths its all good
I error its showing image as 404 not found and type image is text/html
<div>
<div class="row">
<div class="col sm" *ngFor="let post of usersdata.post">
<div class="card" style="width: 310px">
<img class="card-img-top" src="{{'../../../assets/img/Uploads/UserPosts/'+post.postUrl}}" height="250"alt="Card image">
<div class="card-body">
<img class="ui avatar image" src="{{'../../../assets/img/Uploads/Profile image/'+usersdata.img}}">
<span class="card-title"> <b>{{usersdata.name}}</b> </span>
<br><br><p class="card-text">{{post.caption}}</p>
<hr/>
<div class="ui labeled button" tabindex="0">
<div (click)="toggle()" [ngClass]="buttn">
<i class="far fa-heart"></i> Like
</div>
<a class="ui basic red left pointing label">
{{like}}
</a>
</div>
<div class="ui labeled button" tabindex="0">
<div (click)="toggle2()" [ngClass]="buttn2">
<i class="fas fa-heart-broken"></i> DisLike
</div>
<a class="ui basic left pointing black label">
{{dislike}}
</a>
</div><br><br>
<button class="ui right floated basic black button"> <i class="far fa-comment fa-2x "></i></button>
</div>
</div>
</div>
</div>
</div>
It might be an issue while creating your URL for rendering the Image because the error you have is 404 which means the resource you are looking for with the HTTP request is not present. you can check the URL of your other images which are getting rendered and match with the failed one(with necessary changes).

How to show a message if there are no products inside a category with exp:resso store plugin?

I'm using the latest version of EE2 and a plugin called Exp:resso store.
I have products assigned to a category and for the most part all of this is working fine. Below is my code:
<div class="col-md-7">
{exp:channel:categories channel="products" style="linear"}
<section class="section accordion repeater">
<h3>
{category_name}
<div class="icon">
<img src="/assets/local/img/plus-icon.jpg" alt="">
</div>
</h3>
<div class="accordion-content">
{exp:store:search orderby="title" sort="asc" category="{category_id}"}
{exp:store:product entry_id="{entry_id}"}
<p class="accordion-download">
{title} - {price}
<span><img src="/assets/local/img/add-to-cart.jpg" alt="">Add to cart</span>
</p>
{/exp:store:product}
{/exp:store:search}
</div>
</section>
{/exp:channel:categories}
</div>
I'm trying to find a way to show a No products exist message if the category doesn't have anything inside of it. I've tried using {count}, {total_results} & {total_rows} to check if there aren't any products. Problem is everything I try is obviously wrong because nothing gets output :/
Thanks in advance
The store search tag is a wrapper for the channel entries tag pair so you would need to use the {if no_results} tag pair.
<div class="col-md-7">
{exp:channel:categories channel="products" style="linear"}
<section class="section accordion repeater">
<h3>
{category_name}
<div class="icon">
<img src="/assets/local/img/plus-icon.jpg" alt="">
</div>
</h3>
<div class="accordion-content">
{exp:store:search orderby="title" sort="asc" category="{category_id}"}
{exp:store:product entry_id="{entry_id}"}
<p class="accordion-download">
{title} - {price}
<span><img src="/assets/local/img/add-to-cart.jpg" alt="">Add to cart</span>
</p>
{/exp:store:product}
{if no_results}
There are no products
{/if}
{/exp:store:search}
</div>
</section>
{/exp:channel:categories}
</div>
Should also be mentioned if you are not creating a form for the to add the products to the cart you could use the {store_field_short_name:price} variable to reduce the number of queries on your page. Most store things such as sku, weight, measurements can all be access by using the field short name followed by :variable

Change Tumblr hiding my photoset

I want to make my theme show the photoset like it does with normal photos, but one under another.
I'm using this theme right now http://theme-neptune.tumblr.com/
And this is the code for the Photoset block
{block:Photoset}
{block:IndexPage}
<div class="photoset">
<div class="box">
<div class="hover">
PHOTOSET
See full set
</div>
</div>
{Photoset-250}
</div>
{/block:IndexPage}
{block:PermalinkPage}
{Photoset-500}
{/block:PermalinkPage}
{block:IndexPage}
{block:ifshowcaption}
{block:Caption}
<div class="caption photo_caption">{Caption}</div>{/block:Caption}
{/block:ifshowcaption}
{/block:IndexPage}
{/block:Photoset}
Im totally new to all this, I need help.
Photoset Photos
You can loop through the photos in a photoset using {block:Photos}:
{block:Photoset}
{block:Photos}
<img src="{PhotoURL-250}">
{/block:Photos}
{/block:Photoset}
This will output each photo as an img element. Below is the markup for the OP's question:
{block:Photoset}
{block:IndexPage}
<div class="photoset">
<div class="box">
<div class="hover">
PHOTOSET
See full set
</div>
</div>
{block:Photos}
<img src="{PhotoURL-250}"{block:Caption} alt="{PlaintextCaption}"{/block:Caption}>
{/block:Photos}
</div>
{/block:IndexPage}
{block:PermalinkPage}
{block:Photos}
<img src="{PhotoURL-500}"{block:Caption} alt="{PlaintextCaption}"{/block:Caption}>
{/block:Photos}
{/block:PermalinkPage}
{block:IndexPage}
{block:ifshowcaption}
{block:Caption}
<div class="caption photo_caption">{Caption}</div>{/block:Caption}
{/block:ifshowcaption}
{/block:IndexPage}
{/block:Photoset}

Add new html tag into existing component jsf 1.1/1.2 (XPages)

There is a standard Pager component which renders below html structure:
<div class="xspPagerContainer">
<div class="xspPagerRight" id="view:_id1:pager1">
<span class="xspPagerNav xspFirst" id="view:_id1:pager1__First">
First
</span>
<span class="xspPagerNav xspPrevious" id="view:_id1:pager1__Previous">
Previous
</span>
<span class="xspPagerNav xspGroup" id="view:_id1:pager1__Group">
<span>
<span class="xspFirstItem xspCurrentItem">
1
</span>
<span>
<a>2</a>
</span>
<span class="xspLastItem">
<a>3</a>
</span>
</span>
</span>
</div>
</div>
I would like to add some extra html tags like into above structure:
<div class="xspPagerContainer">
<div class="xspPagerRight" id="">
<span id="NewSpan"></span>
<span class="xspPagerNav xspFirst" id="someId">
First
</span>
<span class="xspPagerNav xspPrevious" id="view:_id1:pager1__Previous">
Previous
</span>
I was trying to use renderer to do it but I was not able to add anything inside xspPagerContainer div. All I achieved was to add something before or after this div.
Is something like this possible? How can I add html tag to already existing component without javascript (jQuery etc.) ? Should I create own component and create own renderer ?
This is IBM variation of JSF used in Xpages.

Error in Expression Engine Embed

I have a site I'm working on at the moment, in which I have a sidebar displaying the 10 most recent posts (titles as links). I'm calling this in with the Embed function.
Though when I am looking on the individual post itself, the list only displays the post title that I'm on.
My embedded code calls all 10 of the recent posts in a exp:channels entry normal way.
Is there something I've done wrong? Below is the code for the main blog page:
{embed="embeds/html_header"}
<!-- content -->
{embed="embeds/html_blog_top"}
<div class="container">
<div class="row">
{embed="embeds/html_blog_sidebar"}
{exp:channel:entries channel="blog" limit="1"}
<div class="span8">
<article>
<header class="postHeader">
<div class="row-fluid">
<div class="span3 postDate">{entry_date format="%d"}<span>{entry_date format="%F"}</span></div>
<div class="span9 postPic">
<div class="imgWrapper">
{blog_image}
</div>
</div>
</div>
</header>
<div class="row">
<section class="span6 offset2">
<h2>{title}</h2>
<p>{full_entry}</p>
<p><span class='st_sharethis' displayText='ShareThis'></span>
<span class='st_facebook' displayText='Facebook'></span>
<span class='st_twitter' displayText='Tweet'></span>
</p>
</section>
</div>
</article>
</div>
{/exp:channel:entries}
</div>
</div>
</section>
<!-- footer -->
{embed="embeds/html_footer"}
This is the sidebar embed:
<aside class="span4" style="float:right;">
<section class="widget search clearfix">
<h3>news</h3>
<p>
{exp:channel:entries channel="blog" limit="10" orderby="date"}
{title}<br>
{/exp:channel:entries}
</p>
</section>
<section class="widget">
<h3>Archives</h3>
<ul>
<li>
{exp:channel:month_links channel="blog"}
{month} {year}<br>
{/exp:channel:month_links}
</li>
</ul>
</section>
</aside>
Its just the bit with the news section that I can't seem to get as a full list on the individual page.
Add dynamic="no" to your embed entries loop and you should be good.
Also, if you want answers on ExpressionEngine questions more quickly, try posting to expressionengine.stackexchange.com

Resources