Wp-calypso: Are there more Placeholder values?

Created on 23 May 2019  Â·  7Comments  Â·  Source: Automattic/wp-calypso

I've noticed in blog template some new tags {{Month Year}} (yes, with a space):

…my new blog, started in {{Month Year}}…

and {{Vertical}}:

Welcome to my new {{Vertical}} blog

@michaeldcain @iamtakashi is there a full list available? The list we got the last time only had Phone, Address and CompanyName but there seems to be more.

site: PaZP5U-c-p2

Signup Verticals [Status] Stale [Type] Question

All 7 comments

{{Vertical}}

Sorry, I missed this in #21. Vertical corresponds to the site's site_vertical option, which is stored as an ID (i.e. p1) and will need to be referenced in the verticals list to get the slug. /cc @ramonjd for help with this

{{Month Year}}

This seems a little unnecessary for an initial version, given that the post has a post date and the sentence could end at "This is the first post on my new blog." /cc @ranh for his opinion

It’s redundant in the sense that it repeats the publication date. The purpose is to make the post less generic and more unique/ personal. IMHO it does seem like something one would write in a post, and I like how it commemorates the blog’s founding for the long term by anchoring it in a time period, in a more substantial way than a piece of metadata would.

All that said, this is also a very small detail and not likely to have a large impact one way or another. When I added it to the template it was much earlier in the project, and my thinking was that since this is the same functionality as we have for the vertical name, it wouldn’t significantly widen the scope.

I discussed it with a few people but was not aware of a list. The actual “name” of the tag (with the space) was just made up by me and typed into the editor on spec, obviously it can be whatever else that works.

Anyway, I wouldn’t say it’s unnecessary, but also certainly not a blocker to launch. It would be nice to have... :)

It's super easy to support for us, we just need to be aware of all the possibilities.

In this case the Month Year is inside a blog post. We don't use those at all, we only use pages. However when the possibility is there, sooner or later, somebody might use the tag on a page too and I'd like to be ready for that.

What you mention in the post is what we have a use for right now. It would be hard to predict what might come down the line. The month/year thing is really very specific to the first post on the blog, but as you say, once it's there to be used on posts, it would be very easy for someone to come up with a use for it on a page.

Vertical corresponds to the site's site_vertical option, which is stored as an ID (i.e. p1) and will need to be referenced in the verticals list to get the slug. /cc @ramonjd for help with this

You can grab the vertical definition, which will contain the name and other goodies, using the Site_Verticals class in the backend. See under lib/nux-helpers

$site_verticals = new Site_Verticals();
$vertical_id = 'p1';
$vertical_definition_object = $site_verticals->search_by_id( $vertical_id );

We can provide defaults if needed as part of the Headstart process, given a predictable pattern, that is {{ string }}.

If all these template placeholders need to be parsed during Headstart, then it would be great to find a way to keep track of them of them all.

Perhaps a dictionary/constants list somewhere that's accessible by the Headstart lib.

This issue has been marked as stale and will be closed in seven days. This happened because:

  • It has been inactive in the past 9 months.
  • It isn't a project or a milestone, and hasn’t been labeled `[Pri] Blocker`, `[Pri] High`, `[Status] Keep Open`, or `OSS Citizen`.

You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation.

It looks like our approach to verticals is changing, and this is now not as applicable. Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cpapazoglou picture cpapazoglou  Â·  64Comments

serabi picture serabi  Â·  66Comments

pauljacobson picture pauljacobson  Â·  60Comments

marianearchimbaud picture marianearchimbaud  Â·  52Comments

supernovia picture supernovia  Â·  49Comments