Forum

Thread tagged as: Question, Docs

Do I need to switch to Textile?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, but you do need to use the correct syntax for the formatting language you're using.

It would be very helpful if someone could suggest what the correct syntax is that I should use.

Originally I had :

<perch:events id="eventDescHTML" type="textarea" textile="true" editor="markitup" encode="false" />

which is straight out of the event-detail.html template downloaded with the events app.

But as it didnt work I followed a post in the support : https://forum.grabaperch.com/forum/01-31-2017-markdown-links-not-working which said :

Hi Phil,

If you are using markdown you need this for your description:

<div class="description"><perch:events id="eventDescHTML" type="textarea" markdown="true" editor="markitup" encode="false" /></div>

At the moment you have textile="true" - it needs to be markdown="true"

So I changed it to :

<perch:events id="eventDescHTML" type="textarea" markdown="true" editor="markitup" encode="false" />

And also in this post https://forum.grabaperch.com/forum/11-10-2015-events-app-v192-uses-textile-not-markdown you : The Events app is a little long in the tooth. In your config.php file, add:

define('PERCH_APPS_EDITOR_MARKUP_LANGUAGE', 'markdown');

Which I also tried.

But as it didnt work I followed a post in the support : https://forum.grabaperch.com/forum/01-31-2017-markdown-links-not-working which said :

Hi Phil,

If you are using markdown you need this for your description:

<div class="description"><perch:events id="eventDescHTML" type="textarea" markdown="true" editor="markitup" encode="false" /></div>

At the moment you have textile="true" - it needs to be markdown="true"

And also in this post https://forum.grabaperch.com/forum/11-10-2015-events-app-v192-uses-textile-not-markdown Drew says : The Events app is a little long in the tooth. In your config.php file, add:

define('PERCH_APPS_EDITOR_MARKUP_LANGUAGE', 'markdown');

Which I also tried.

The site has been using the events module for a couple of years but this is the first time the client has had a problem with it. It is possible that it is the first time they have added document and url links from it.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you've set markdown as the formatting language, a link is formed like this:

[The text for the link](https://example.com/)

Thats what I expected. As above I have set markdown as the formatting language, but in the event the link is formed like this :

"Your text to link here...":https://www.cow-shed.com

Which doesn't work.

Drew McLellan

Drew McLellan 2638 points
Perch Support

the link is formed

By what/whom?

The link is formed by Perch user :

User goes into Event : Editing an event

Under Description there is a list of H, B, I ... link

User chooses Link

Pop up says Link and box starting https://

User enters url : eg https://www.cow-shed.com and clicks ok

New line added to Description box saying : "Your text to link here...":https://www.cow-shed.com

User replaces Your text to link here... with something useful (or leaves it)

User Saves Event

Event on website now has link saying : “Your text to link here…”:https://www.cow-shed.com eg https://www.chiddingfoldfarmers.com/pages-cfpc/event.php?s=2017-11-05-munchkins-rally-at-parwood

This is my event-detail.html template code - as downloaded from Perch except event id changed from textile="true" to markdown="true" as advised by a post in the support forum : https://forum.grabaperch.com/forum/01-31-2017-markdown-links-not-working :

<!-- Event detail displays the details of the event on the listing event.php page nb event id changed from textile="true" to markdown="true" -->



<h2 class="icon"><perch:events id="eventTitle" /></h2>

<div class="event">

<time datetime="<perch:events id="eventDateTime" format="Y-m-d" type="date" />" class="icon"><span class="day"><perch:events id="eventDateTime" format="d" type="date" /></span> <perch:events id="eventDateTime" format="F" type="date" /></time>

<perch:events id="eventDescHTML" type="textarea" markdown="true" editor="markitup" encode="false" />

 </div>