Render All Joomla! 4 Standard Form Fields using a article layout override. To make it work, you can put this the j4xall.php file at this location:
JPATH_ROOT/templates/cassopeia/html/com_content/article/j4xall.php
| <?php | |
| defined('_JEXEC') or die; | |
| ?> | |
| <div class="latestnews"> | |
| <ul class="list-group list-group-flush"> | |
| <?php foreach ($list as $item) : $image = json_decode($item->images); ?> | |
| <?php | |
| // most important part | |
| // context: | |
| // for articles: com_content.article |
| // gulpfile.js | |
| // Initialize modules | |
| const gulp = require('gulp'); | |
| // Importing all the Gulp-related packages we want to use | |
| const concat = require('gulp-concat'); | |
| const sourcemaps = require('gulp-sourcemaps'); | |
| const sass = require('gulp-sass'); | |
| //const browserSync = require('browser-sync'); | |
| //const server = browserSync.create(); | |
| const child = require('child_process'); |
| <?php | |
| /** | |
| * Replaces query version in registered scripts or styles with file modified time | |
| * | |
| * @link https://wordpress.stackexchange.com/a/346024/51130 based on | |
| * | |
| * @param $src | |
| * | |
| * @return string |
| <label for="demo">Demo</label> | |
| <select id="demo" name="demo"> | |
| <?php array_unshift($this->myExampleOptionsArray, null); ?> | |
| <?php echo HTMLHelper::_('select.options', $this->myExampleOptionsArray, 'value', 'text', $this->selectedOptionValue ?? '');?> | |
| </select> |
| <?php | |
| // Quick Intro into the Joomla HTMLHelper class | |
| // Checkout also this video: https://www.youtube.com/watch?v=aHY_hsu7iuk | |
| // File: \libraries\src\HTML\HTMLHelper.php | |
| use Joomla\CMS\HTML\HTMLHelper; | |
| // Image | |
| echo HTMLHelper::_('image', 'plg_system_web357framework/fix404errorlinks.png', Text::_('Fix 404 Error Links extension for Joomla!'), null, true); | |
| echo HTMLHelper::_('image', 'media/plg_system_web357framework/images/fix404errorlinks.png', Text::_('Fix 404 Error Links extension for Joomla!'), null, false); |
| <?php | |
| function renderForm ($endpoint) { | |
| // get the data from the API and convert it to a PHP object | |
| $formResult = file_get_contents($endpoint); | |
| $formContent = json_decode($formResult); | |
| $formFields = $formContent->fields; | |
| // start building the DOM | |
| $dom = new DOMDocument(); | |
| $form = $dom->createElement('form'); |
| # Oto Brglez - <otobrglez@gmail.com> | |
| $folderPath = "dodo-was-here" | Resolve-Path | |
| Get-ChildItem -Path $folderPath -Recurse -File | | |
| ForEach-Object { | |
| $newName = Join-Path (Split-Path $_.FullName) ` | |
| -ChildPath ($_.FullName -replace $folderPath,'' -replace '/|\\','-' -replace '^(.)','') | |
| Rename-Item -Path $_.FullName -NewName $newName -Force # -WhatIf | |
| } |