This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Newbie1
Newbie1

Hi,

I've downloaded OctoberCMS to give it a try, along with a few plugins.

I need to set up a site but it needs to be simple for someone else to edit the in-page content, hence opting for the static page plugin.

I seem to be having some issues, although I'm sure there are simple/easy answers...

1) I've added a placeholder within a template so I can have an optional extra section within the page. This needs to be HTML, so I've set the type to html so it has the editor in the backend. However, if I edit the text in the editor but then delete, I seem to be left with empty p tags so the placeholder is still showing, even though it has no actual content! Is there a simple way to ensure the editor strips out these empty p tags so the placeholder doesn't show?

1b) Just to add to this, I tried installing the WYSIWYG editors plugin as I thought maybe TinyMCE won't have this same issue, but whenever I enable the plugin the editor stops showing altogether on the edit page. Console error shows an JS error "TypeError: c is not a constructor" in FF. Also, the placeholder editor seems to stick with redactor anyway, so I'm unsure if this plugin even works for the placeholder content?

2) Can anyone help me understand how to correctly use snippets? I've set up a snippet (from a partial) and just for testing I was hoping for it to spit out a variable the user assigns from the page, but I'm not sure if I've understood their functionality properly because I'm having issues. I set up the snippet with a property title, code etc, row added and in the code I simple wanted to echo out the value the user assigned to this variable to test it working. However, when I add the snippet to the static page it shows it in the editor but there doesn't appear to be anywhere to assign a value to the custom variable, so it doesn't show it in the front end (it shows the hard coded bit of the snippet, but not the variable)? Also, when I go back to the edit snippet page (in CMS > partials) it loses the variable row I added? I'm guessing I've got the wrong end of the stick with how its meant to work!

Thanks

Last updated

AlanQ

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.