genericFJS

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About genericFJS

  • Rank
    Newbie

Profile Information

  • Gender
    Male
  • Location
    Germany
  1. genericFJS

    @kongondo Yes, I meant inline pictures (or other inline elements as described) which were uploaded in a seperate image field which I inserted like this: <img alt="<?php echo $page->images["image.jpg"]->description; ?>" class="d-block w-100" src="<?php echo $page->images["image.jpg"]->size(1200,1200)->url; ?>" />
  2. genericFJS

    @kongondo I'm talking about images, code (as in <code></code>) or other language-independent HTML-elements surrounded by text/paragraphs etc.
  3. genericFJS

    @kongondoThanks for your reply. You are right, I am including PHP in my content. The main reason for this is, that I hate the built-in multilanguage-support as it does not separate formatting from content (i.e. when I want to move a picture in the german version, I have to move the picture in the english version explicitly as well). There are other reasons too (i.e. image sizing). Your suggestion seems to be a very good idea for these, thanks. If there were a system to handle my main concern (inline translation) and a syntax highlighter for the backend editor* I could be pursuaded to drop my php-file-idea entierly Thanks again for your consideration. * I have found i.e. Prism but not yet tried it as my localization-needs are my main concern.
  4. Hi, for easier editing with external code-editors (with benefits such as syntax highlighting and additional scripting-capabilities) I am saving my (Text-)content to a (php-)file instead of editing it in the backend. My current solution looks like this: My page templates have a file upload where I upload the php-file. The php file gets read in my page template like this (with a fallback for the regular body content): if ($page->bodyPHP) { ob_start(); include(getRelativeAssetPath($page->bodyPHP->url)); $content = ob_get_contents(); ob_end_clean(); } else { $content = $page->body; } This leads to the problem, that I can not edit my page (text-)content with the backend any more, if I am not at my desktop with FTP-access to the website. Here are a few questions regarding this challenge: Can I create a (modified) textarea-inputfield to load and save content from/to a php file instead of the database (possibly automatically without an explizit file-inputfield)? I tried having a look at the inputfield source code but did not manage to get a hang of it. Is this solution a (very) bad idea performance-wise (I'm not concerned about the backend-security that much since I am the only editor)? Are there solutions, that make my workaround superfluous? I would be really glad if someone could answer some or all of my questions. Thank you.