Finding Text File Source Code in File System

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe Version: 3

I’m trying to locate and edit the source text which was entered via the CMS, I can find the file directory or the format it is stored in within the file system. I can find the images fine but not sure where I can locate the text. Does anyone know the file location, and file type of the text entered via the CMS.

Thanks

Hi,

I’m not sure I fully follow what you’re asking here. All the text content from the CMS is generally stored in the database, not in text files.

Hi there Dorset Digital, thanks for getting to my comment. I’m just trying to locate the source text from the CMS content entries (i.e a user enters text and image in the CMS and publishes, but where is it then stored in the source files? If it’s stored in a database as you mention, which file (and format) should I be looking for, as I need to edit it in the backend/source file? I’ve inherited this site from a previous employee so just trying to piece together how it was made by them…

Thanks,

Jason

Hi again,

There should be no need to edit any of the source files unless you want to change site functionality or make changes to a template, etc.

As I mentioned, content added to the CMS is stored in the database, not in any of the source files. If you want to edit that content, then you’d edit it in the CMS.

I’d just like to get around the CMS, as it has automated functions which run, like downsampling my images; every time I add a nice image it downsamples it on saving and the quality is ruined, I’m having to each time find the downsampled file and push a new one to the server in it’s place that is better quality but then if I open the CMS to make text changes after the event it will just downsample the images again. I’d rather just code everything myself and not use the CMS. That’s my issue.

Hi,

The CMS shouldn’t downsample images by default… it’s probably being told to do so in the template code. So, the first place to look would be in the template files (with a .ss extension) in the themes directory. You might find that they have image manipulation functions such as $Image.ScaleWidth(500) or similar. It will produce thumbnails for use in the CMS system.

Silverstripe is generally pretty good at not being too opinionated in the way it works, so it’s not usually necessary to try and circumvent it.

Trying to edit content directly in the database, or by overwriting files is going to ultimately end up being very time-consuming and frustrating, since there’s a lot going on behind the scenes such as versioning, etc. which is masked by the CMS.

@DorsetDigital datasheet page doesn’t seem to have any references to “image” in the code… Is there a way I can send you the site folder so you can locate it for me? Thanks

Looks like there’s just HTML pages in there, wrapped in .ss files…


Would it be in a particular config file or something? I did research this before but it seemed a bit hard to locate the source settings…

Thanks

All pages added via the CMS editor, for example, Air Conditioning Cleaning Specialists, HVAC Duct Cleaning QLD, NSW - Clean Air Australia I added a logo of good quality and it saves as poor quality once published, I would like to disable this downsampling feature so I can sort the image sizes myself. Please can you help me find where the settings are?

I only picked the data sheet page as an example.
You mentioned that you’re seeing images being downsampled… where on the site are you seeing that?

Obviously I’m guessing a bit here, since I haven’t seen any of the code. If you’re seeing images being resampled on a page, then the place to start looking will be in the .ss template that’s used to render the page. So if, for example, you’re seeing the image issue on a data sheet page, then that’s the template to investigate.

Silverstripe templates are mostly just HTML, but will usually have various controls and methods to inject dynamic content.