Menterprise news
Menterprise news
get.menterprise.io

MPSS 3.0

 

Feature

 

 

We're constantly improving it, and adding more MPSS features to Content as well, so here's the latest upgrades!

Introducing: Property variables! MPSS now includes Property Variables, Pick Variables, Static Variables and Ignore Tags! Each of these can be used as much or as little as you like. Here's how to use them:

 

Variables

(since 1.0) Variables contain spintax, or anything else. The value is then used wherever the variable is used, and then spun. Menterprise Content uses this to reduce the size of spintax by changing re-used spintax to variables.

Syntax

Define: [=spin]{My|Your} {Awesome|Great} Spintax[/spin]

Use: [#spin]

 

Example 1

Input:

[=spin]{My|Your} {Awesome|Great} Spintax[/spin]
<h1>[#spin]</h1>
Cool!
<h2>[#spin]</h2>

MPSS:

<h1>My Great Spintax</h1>
Cool!
<h2>your Awesome Spintax</h2>

 


 

Static Variables

(since 2.0) Unlike normal variables, Static Variables are spun once and then repeated. This is great for things like cities or locations, where you want your content to talk about the same thing consistently.

Syntax

Define: [@=city]{New York|Boston|DC}[/spin]

Use: [@city]

 

Example 1

Input:

[@=city]{New York|Boston|DC}[/spin]
<h1>All About [@city]</h1>
Content about [@city]
<h2>Top Things to Do In [@city]</h2>

MPSS:

<h1>All About New York</h1>
Content about New York
<h2>Top Things to Do In New York</h2>

Notice it's all New York? Because @city was spun out to New York once, and then used  each time. If you were to spin it again, you may get DC or Boston, but every occurance would be the same. Hence, it's "static".

 


 

Property Variables

(since 3.0) Property (or "prop") variables are an extension to Static Variables that support multiple pieces of data, which allows you to do things like city/postcode or product/price with ease!

Syntax

Define:

[:=product]
BlendMaster,$250
BlendFast 3000,$784
Vitamixer,$999
[/product]

Seperate rows by line and columns by comma, similar to a CSV. Feel free to use more than 2 columns, but for our example 2 works :)

 

Use: [:product-1] and/or [:product-2]

Note how we use a -number at the end? That's to tell MPSS which column you want. So, in our example, [:product-1] is the name of the product and [:product-2] is the price.

 

Example 1

Input:

[:=product]
BlendMaster,$250
BlendFast 3000,$784
Vitamixer,$999
[/product]

<h1>All About [:product-1]</h1>
The best blender is [:product-1] and the price is [:product-2]
<h2>Top Blenders for Under [:product-2]</h2>

MPSS (spin 1/3):

<h1>All About BlendMaster</h1>
The best blender is BlendMaster and the price is $250
<h2>Top Blenders for Under $250</h2>

MPSS (spin 2/3):

<h1>All About BlendFast 3000</h1>
The best blender is BlendFast 3000 and the price is $784
<h2>Top Blenders for Under $784</h2>

MPSS (spin 3/3):

<h1>All About Vitamixer</h1>
The best blender is Vitamixer and the price is $999
<h2>Top Blenders for Under $999</h2>

Notice how just like Static Variables, each page has one version. However, with Property Variables, we now have access to multiple properties and therefore we can mention the name and price of the product!

 


 

Pick Variables

(since 2.5) Unlike normal variables and static variables, Pick variables introduce a way of creating "sets" of Spintax that can be used within the page. This is great for multiples of things - a good mix between the Static variables and normal variables.

Syntax

Define:

[&=example]
Choice {1|2|3}
Choice {A|B|C}
[/example]

Use: [&example]

 

Example 1

Input:

[&=example]
Choice {1|2|3}
Choice {A|B|C}
[/example]

My choice is: [&example]
My choice is: [&example]
My choice is: [&example]

MPSS:

My choice is: Choice 2
My choice is: Choice 3
My choice is: Choice 1

OR

My choice is: Choice A
My choice is: Choice C
My choice is: Choice B

Notice how in each example, there's a different set of Spintax results? That's because MPSS chooses one of the choices from the pick statement and uses that!

 


 

Ignore Tags

(since 2.0) Put in stuff you don't want spun. Super useful for Javascript code with curly braces {}.

Syntax

[!ignore] stuff [/ignore]

 

Example 1

Input: [!ignore]My Title | The Best[/ignore]

Normal spintax (non-MPSS): [!ignore]My Title

MPSS: My Title | The Best

Example 2

Input: [!ignore] t = { k: true }; if(t.k){ alert('hi!') } [/ignore]

Normal spintax (non-MPSS): [!ignore] t = k: true ; if(t.k) alert('hi!') [/ignore]

MPSS: t = { k: true }; if(t.k){ alert('hi!') }


Alright! That's it for now. We're really excited about the opportunities MPSS can bring. We finally have the freedom to provide the ultimate experience (because we develop both platforms!)