Remove post date on my pages - tumblr

Immediately after my {block:Posts} I have placed a date that will display the post date on top of every post I make. But I realized this piece of code is also rendered on my Pages as well and thus produces unwanted commas and <br/>s. How can I let Tumblr know that I only want these dates to appear on my main blog page and not in any other pages?
Update:
{block:Text}
<strong>{DayOfWeek}, {DayOfMonth} {Month} {Year}</strong>
<br/><br/>
<div class="text post">
{block:Title}
<h2><div class="textposttitles">{Title}</div></h2>
{/block:Title}
{Body}
{block:IndexPage}
<div class="permalink">
<p class="date">
{NoteCountWithLabel}</p>
</div>
{/block:IndexPage}
</div>
{/block:Text}

Date Block and Variables
Currently the OP is using just the date variables, without the block. The block checks to see if the post has a date, and then render its.
As pages don't have a date, the block check fails and the date isn't rendered.
{block:Posts}
{block:Date}
<strong>{DayOfWeek}, {DayOfMonth} {Month} {Year}</strong>
{/block:Date}
{/block:Posts}
On a sidenote, the {block:Date} is a handy way to render markup (shares, comments, etc) specific to posts only.
Reference
Date Operators https://www.tumblr.com/docs/en/custom_themes#dates

Related

what is the current opinion on using <meta> tags to hide individual instances of a recurring itemtype="http://schema.org/Event"

This event is a local farm market where the client will be making weekly appearances at a venue which shifts bi-annually. Because the recurrence of the event is irregular (some weeks the start time may be different and the number of days between events varies between 7 and 5), there is plenty of justification to list them individually. However, a human reader will not like the aesthetics of 20+ listings all having the same description.
You don’t have to duplicate the description, you can use the itemref attribute:
<p itemprop="description" id="farm-market">…<!-- description for all events --></p>
<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
<time itemprop="startDate">2015-01-20</time>
</div>
<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
<time itemprop="startDate">2015-02-04</time>
</div>
If you don’t want to show any content from the single events (i.e., not even the date), then yes, you should use meta elements in Microdata:
<p itemprop="description" id="farm-market">…<!-- description for all events --></p>
<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
<meta itemprop="startDate" content="2015-01-20">
</div>
<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
<meta itemprop="startDate" content="2015-02-04">
</div>
There’s nothing wrong about using meta.
It’s what gets used in some examples from the Microdata (W3C Working Group Note) specification, and for this purpose Microdata defines that it’s valid to use meta elements in the body.

Microdata (schema.org) - Event - empty startDate

Could anyone tell me what if the EducationEvent has not got startDate and endDate, because it is not known yet? If I set an empty value for it ($startIso is an empty string):
<meta itemprop="startDate" content="{{ $startIso }}" />
I get:
Error: Missing required field "dtstart".` error message in validator.
Here’s the code:
<div itemscope itemtype="http://schema.org/EducationEvent">
<h1 class="columns">
<span itemprop="name">{{ $courseTypesDescription->course_type_name }}</span>
</h1>
<div class="dates columns">
<div class="row">
<div class="large-5 medium-6 columns">
#if ($start != "")
<meta itemprop="startDate" content="{{ $startIso }}" />
#endif
<i class="fa fa-calendar"></i>
<span class="text">Start: </span>
<span class="data"> #if ($start != "") {{ $start }} #else N/A #endif</span>
</div>
<div class="large-5 medium-6 columns end">
#if ($exam != "")
<meta itemprop="endDate" content="{{ $examIso }}" />
#endif
<i class="fa fa-pencil-square-o"></i>
<span class="text">Exam: </span>
<span class="data"> #if ($exam != "") {{ $exam }} #else N/A #endif </span>
</div>
</div>
</div>
<article class="description columns" itemprop="description">
{{ $courseTypesDescription->course_type_desc }}
</article>
</div>
I agree with unor's answer but I would recommend you to use http://schema.org/Event rather than using http://schema.org/EducationEvent because Google is currently showing rich snippets on organic search for only those categories which are their in the Help Center document-
https://support.google.com/webmasters/answer/99170?hl=en
What you are implementing is a sub category of Event schema. You are correct in your way as you must be trying to specify the kind of events you have on your website. But as per my experience Google is not showing snippets for all available sub categories present on schema.org like schema.org/EducationEvent
Schema.org is format(syntax) of rich snippet markup implementation and apart from that schema.org has long list of Structured Data categories and Sub Categories. For all of those categories(http://schema.org/docs/full.html) Google doesn't show snippets. Only those appear with rich snippets on Google which are present in their official help center document as mentioned above.
This will increase the possibility to earn rich snippets for your website.
Your usage of Microdata with the Schema.org vocabulary is correct (if you make sure to remove the properties with empty values). Schema.org doesn’t define any required properties.
It’s just that Google Search, according to their documentation, seems to require the startDate property for displaying the Events Rich Snippet (and also location if it’s a single event, and url if your page lists several events).
If you don’t provide it, and if Google’s docs are correct, you won’t get (the chance for displaying) a Rich Snippet for your event. They probably require a future start date because they don’t like to display Rich Snippets for past events.
That doesn’t mean that you should omit the markup. It can be useful for other consumers (even possibly from Google, unrelated to their Rich Snippets), and Google’s Rich Snippets guidelines might change in the future, allowing for other types of Event snippets.

Need help adding Microdata to an event

I'm struggling to correctly add microdata to events on my page. The Google Structured Data Testing tool can read the data but it isn't displaying it correctly. I'm getting confused.
I am trying to tag it for a sports league that has a single event on one night that consists of three games all taking place at the same location.
<div itemscope itemtype="http://schema.org/SportsEvent"><!--microdata week 1 event-->
<meta itemprop="name" content="Week 1 Lacrosse Games">
<meta itemprop="location" content="Street, Town, NY">
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3"> <!--column-->
<h3>Week 1<br><span itemprop="startDate" content="2014-06-27T18:00">Friday, June 27</span></h3>
<br>
<div itemprop="subEvent" itemscope itemtype="http://schema.org/subEvent">
<h4><span itemprop="name">Game 1</span> - 6:00 PM</h4>
<p><span itemprop="performer">Team 1 vs.Team 2</span></p>
</div>
<div itemprop="subEvent" itemscope itemtype="http://schema.org/subEvent">
<h4><span itemprop="name">Game 2</span> - 7:00 PM</h4>
<p><span itemprop="performer">Team 3 vs. Team 4</span></p>
</div>
<div itemprop="subEvent" itemscope itemtype="http://schema.org/subEvent">
<h4><span itemprop="name">Game 3</span> - 8:00 PM</h4>
<p><span itemprop="performer">Team 5 vs. Team 6</span></p>
</div>
</div><!--end column-->
</div><!--microdata week 1 event-->
I'm not sure what sort of problems you're having with the rich snippets displaying, but I did notice a couple of things that I'd recommend you change. Since all of these events are sporting events, I would probably recommend that you use the SportsEvent type for them all. You also need to specify all of the start times in ISO 8601 format. Additionally, the expected value of the "performer" property is either an Organization or Person, and SportsTeam is an extension of the Organizaton type. So I would recommend using that property twice within each event so that you could specify the two different teams that are playing, along with the SportsTeam type, like this:
<div itemprop="subEvent" itemscope itemtype="http://schema.org/SportsEvent">
<h4><span itemprop="name">Game 1</span> - <meta itemprop="startDate" content="2014-06-27T18:00" />6:00 PM</h4>
<p><span itemprop="performer" itemscope itemtype="http://schema.org/SportsTeam">
<span itemprop="name">Team 1</span></span> vs</p>
<p><span itemprop="performer" itemscope itemtype="http://schema.org/SportsTeam">
<span itemprop="name">Team 2</span></span></p>
</div>
I hope that helps.
Because I was using subevents, Google required that I have the microdata URL called out for each event. They have a rule that says if you have multiple events on the same page, you need to have a URL for each one.
Since I used the same page for all of them, I gave each subevent a unique ID and I linked that ID in the address.

Does wicket lose hold of the HTML components after a rearrangement through JavaScript?

I have a repeating component in wicked which needs to be added and deleted as per the user requirement. The maximum number of component is predefined. So I am adding the components at start up and hiding and showing based on need. I am required to change the arrangement of the components in the HTML markup when there is any deletion of the component. I use JavaScript for this. I want to know if wicket would lose hold of the components if I do this.
<div wicket:id="borrowerTabs" id="borrowerTabs">
<span wicket:id="borrowerTab1" id="borrowerTab1" ></span>
<span wicket:id="borrowerTab2" id="borrowerTab2" ></span>
<span wicket:id="borrowerTab3" id="borrowerTab3" ></span>
<span wicket:id="borrowerTab4" id="borrowerTab4" ></span>
<button wicket:id="addBorrower" id="addBorrower" type="button"></button>
<button wicket:id="deleteBorrower" id="deleteBorrower" onclick="updateUIForDeleteBorrower()" type="button"></button>
</div>
If delete the borrowerTab3, contents inside borrowerTab4 will be replacing the contents inside borrowerTab3 and the model objects too will be swapped though I do not do a target.add(borrowerTab3). Now while form submission, I am not getting the values of the fields inside borrowerTab3.
I'm not sure if it helps but try component.setVisible(false) in your java code to hide it.

Using references in GitHub wiki with restructured text

I'm trying to use internal references to link an index atop my wiki page with several sections within the document. Here's an example:
* `My index`_
+ Foreword_
+ `Technical details`_
My index
--------
Foreword
~~~~~~~~
Technical details
~~~~~~~~~~~~~~~~~
If I generate the HTML page via rest2html I get the right result. However, GitHub wiki inserts extra words in the references and the links do not work. for example:
https://github.com/myaccount/myproject/wiki/Page#wiki-my-index
https://github.com/myaccount/myproject/wiki/Page#wiki-foreword
https://github.com/myaccount/myproject/wiki/Page#wiki-technical-details
I couldn't find any relevant document in the GitHub page, so I'm kind of lost.
It looks like the class ids are missing from the generated divs. Check the page source to (not) see them. I think this is what it should look like:
<ul>
<li><dl class="first docutils">
<dt><a class="reference internal" href="#my-index">My index</a></dt>
<li><a class="reference internal" href="#foreword">Foreword</a></li>
<li><a class="reference internal" href="#technical-details">Technical details</a></li>
</ul>
<div class="section" id="my-index">
<h1>My index</h1>
</div>
<div class="section" id="foreword">
<h2>Foreword</h2>
</div>
<div class="section" id="technical-details">
<h2>Technical details</h2>
</div>
Edit: User intuited mentions the same issue in a GitHub markup issue
I've noticed this problem with README.rst files as well. As well as
headings, inline targets in .rst files, e.g. _some target, don't
work. The inline target text gets wrapped in a but doesn't get
made into any sort of link target. Should I file this as a separate
issue?