Reference kml field in url - href

I have a kml with a href to be displayed as a clickable link in Google Maps.
Can the url be built using a field value? So if the field is called Heritage_Citation, can the url be something similar to
<![CDATA[Click to view this property's Heritage Study]]>
or is this not possible?

Yes, you can do this.
The format for variables in KML uses dollar sign and square brackets, so your example variable would look like this:
$[Heritage_Citation]
And your URL doesn't need quotes around the variable, so it can look like this:
<![CDATA[Click to view this property's Heritage Study]]>
You may have this already, but just to be complete, the field and value need to be specified in the KML feature's ExtendedData section, something like this:
<ExtendedData>
<Data name="Heritage_Citation">
<value>my_variable_value</value>
</Data>
</ExtendedData>
...or similar but different if using a typed data and a Schema based ExtendedData section. More details on all this in the documentation:
https://developers.google.com/kml/documentation/extendeddata

Related

Use the title= HTML attribute with RMarkdown

I am trying to understand if it is possible to insert the HTML title= attribute (not necessarily inside an <abbr> tag) within an RMarkdown document (e.g. a blog post written through blogdown)
From W3C: the title attribute specifies extra information about an element. The information is most often shown as a tooltip text when the mouse moves over the element.
The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.
Couldn't find anything regarding using in in RMarkdown tho
You can write raw HTML in Markdown. However, if you are using Hugo >= v0.60.0, raw HTML will be ignored by default. You need to set an option in your config file to enable it:
[markup.goldmark.renderer]
unsafe= true

Appending DB object string to dynamic urls in Django

I need to append a string stored in DB. e.g ?linkappend which is stored as a DB object link_append to all ebay links that will be displayed in a page. I think I should use template tags but not sure how to go about it.
You say that link_append is an object in the database? How is it stored? How does your view look like?
Because, if link_append is just represented by a ModelField, then it should be fairly easy to append it to the links by adding it as a template-variable like so:
The part after "?" {{ obj.link_append }} does place the content of that ModelField in the GET-part of the link.

OrchardCMS Replacement Tokens for Query Results displaying HTML tags instead rendering them

I am having problems understanding the token system for the output of query / projections.
If I leave the property as is it displays the text content with HTML formatting intact.
But I need to wrap it with a tag, the html tags get displayed as text.
Rewrite Results -> Rewrite output
<div class="collapse" id="toggle_{Content.Id}">
{Content.Fields.CaseStudy.ClientChallenge} </div>
I am trying to create a collapsible text area, I already have a button that hides/unhides the content.
Why is it displaying as text instead of rendering the tags properly.
I think this is because I don't know how replacement tokens work.
Another example problem is up one level on the edit Layout, I want to set the item class to work-item {Category}, Category being the name/title of a property, which I am using for grouping.
Right above the projection: I want to include some html that lists all the Categorys in a ul i.e. data-filter=".experiential" I have tried things like: work-item {Category} and work-item {Content.Fields.CaseStudy.Category}. Category is a "term" (?) from a taxonomy.
I feel like I am failing to understand how it all works.
Submitted as a bug https://github.com/OrchardCMS/Orchard/issues/7355
Will edit and post if it is fixed. In case anoyong else comes across this issue.

How to get list column which is in xslt list view webpart in in JQuery?

I am customizing NewForm.aspx in SP2013 in Designer 2013. I am struggling to get column values from XSLT list view web part in SharePoint designer 2013. I need to manipulate with columns in JQuery to do some action (like hiding, disabling etc.). Currently, I am getting column ID via Developer tool hovering over it but this is not proper way since ID will change in Quality/Production.
Example:-
$("#ctl00_ctl33_g_1ea47d6f_1fed_4426_8e49_cda9970429d6_ff21_ctl00_ctl00_TextField").val("Close");
I want something like:-
$("#column2").val("Close");
My XSLT in SP Designer 2013 looks like:-
<tr><td>
<H3>column2</H3>
</td>
<td>
<SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="Edit"
FieldName="column2" __designer:bind="
{ddwrt:DataBind('u',concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#column2')}"/>
<SharePoint:FieldDescription runat="server" id="ff3description{$Pos}" FieldName="column2" ControlMode="Edit"/>
</td>
</tr>
Please assist.
It's standard ASP.NET behavior that ID of server control is not ID of HTML element that is representing the control. And many of SharePoint controls are rendered by many DIVs and SPANs (especially columns like people, formatted text, ...). So reading and setting values of them is quite complicated process.
Generally you can use title attribute to search for HTML tag that contains HTML element of particular field. Title attribute contains name of the field. For required fields it contains also required information. Or you can try to search for elements with ID starting with internal name of the field. But in both cases you will need to add some additional logic to find the right control containing the value of the field. The logic will need to reflect the type of field you are looking for.
The easiest way is to use some libraries like SPJSutility or form designer to manipulate with form fields.
You can not disable even the simplest textboxes by setting enabled attribute to false because in that case the value will not be processed on the server.

What's the best way to handle optional fields and associated markup on a Sitecore site using Glass Mapper?

I often have optional fields on a content item. If the author fills out an optional field then that field should be displayed on the page along with any markup that goes with that field. For example, let's say that I have a field called Subheading (single line text). If the author enters text for Subheading then it should be displayed on the page like this:
<h4>[Subheading text]</h4>
For a normal field I would do it like this using Glass Mapper:
<h4><%=Editable(x => x.Subheading)%></h4>
But if there is nothing entered for Subheading then I don't want to display anything on the page including the h4 tags. Additionally the markup that goes with the field could be more complicated than that. This is just a simple example.
Is there some simple way using Glass Mapper that I can handle this?
I think you will have to use a wrapping if statement:
<%if(!Model.Subheading.IsNullOrEmpty()) {%>
<h4><%=Editable(x => x.Subheading)%></h4>
<%}%>
Glass doesn't have a way to do this out of the box because it is implementation specific.