Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCs: update #4349

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
/.phpstan.dist.neon export-ignore
/.rector.php export-ignore

/CNAME export-ignore

/README.md export-ignore

# Enforce checkout with linux lf consistent over all platforms
Expand Down
7 changes: 7 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
.github/**/*
]

'git':
- changed-files:
- any-glob-to-any-file: [
.gitattributes,
.gitignore
]

'htaccess':
- changed-files:
- any-glob-to-any-file: [
Expand Down
362 changes: 3 additions & 359 deletions README.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions docs/content/developers/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Most important changes will be listed here, all other changes since `19.4.0` can
- `Mage_GoogleBase`
- `Mage_PageCache` ([#2258](https://github.com/OpenMage/magento-lts/pull/2258))
- `Mage_Poll` ([#3098](https://github.com/OpenMage/magento-lts/pull/3098))
- `Mage_Sendfriend` ([#4274](https://github.com/OpenMage/magento-lts/pull/4274))
- `Mage_Xmlconnect`
- `Phoenix_Moneybookers`

Expand All @@ -42,6 +43,12 @@ _If you rely on those modules you can reinstall them with composer:_
composer require openmage/module-mage-poll
```

- Module `Mage_Sendfriend`

```bash
composer require openmage/module-mage-sendfriend
```

- Legacy frontend themes

```bash
Expand Down
3 changes: 3 additions & 0 deletions docs/content/developers/changelog/new-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Set log level from config. ([#1727](https://github.com/OpenMage/magento-lts/pull
## `newsletter/security/enable_form_key`
\[Theme BC] Add formkey validation to Newsletter subscribe action. ([#1866](https://github.com/OpenMage/magento-lts/pull/1866))

## `rss/admin_order/new_period`
Better config for admin RSS links. ([#4243](https://github.com/OpenMage/magento-lts/pull/4243))

## `sitemap/category/lastmod`
Made sitemap more flexible. ([#1854](https://github.com/OpenMage/magento-lts/pull/1854))

Expand Down
48 changes: 48 additions & 0 deletions docs/content/developers/guides/dynamic-blocks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
hide:
- toc
tags:
- Catagory
- CMS blocks
---

# Dynamic block contents in category page

In _backend > Catalog > Manage Categories_, we can configure a category page and put it on the main menu. The page contents are rendered in

> app\design\frontend\base\default\template\catalog\category\view.phtml

If we want to render an HTML table in which its data are taken from the database, we would follow these steps:

1. Create a custom block `mymodule/mytable` with template `mymodule/mytable.phtml`.
2. Whitelist our block for rendering in the frontend: backend > System > Permissions > Blocks
3. Create a CMS static block: backend > CMS > Static Blocks and set the _Content_ to render from our block with this directive:
```html
{{block type="mymodule/mytable" template="mymodule/mytable.phtml"}}
```
4. Create a subcategory: backend > Catalog > Manage Categories > Add a subcategory and in the _Display Setings_ tab, set the category attribute _Display Mode_ to _Static block only_ and _CMS Block_ pointing to our block.

Voila, the HTML table is rendered under the menu we just created. However, every time the table in the database is updated, and because CMS blocks rendering are taken from the cache, we would need to refresh the cache.

What if the table is constantly being updated, or there is an expiry condition on some data which shouldn't be included? In which case, we would want to render the HTML table dynamically. It's actually quite easy to do:

1. In the subcategory page in backend, set the _Description_ to this:
```html
{{block type="mymodule/mytable" template="mymodule/mytable.phtml"}}
```
2. Continue on to the _Display Setings_ tab and set the _CMS Block_ to _Please select a static block ..._.
3. In our config file, either in the module `etc/config.xml` or in the `local.xml`, insert the following:

```xml
<config>
<global>
<catalog>
<content>
<tempate_filter>cms/template_filter</tempate_filter> <!-- Note the typo on template must remain as "tempate". -->
</content>
</catalog>
</global>
</config>
```

That's it, the table is now rendered dynamically. There 's no need to create the CMS static block.
10 changes: 10 additions & 0 deletions docs/content/developers/guides/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
tags:
- Guides
---

# Guides

**Guides** are focused on accomplishing a specific task and assume that you are
already familiar with the basics of OpenMage. If you're looking for an
introduction to packaging, see :doc:`/tutorials/index`.
10 changes: 10 additions & 0 deletions docs/content/developers/tutorials/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
tags:
- Tutorials
---

# Tutorials

**Tutorials** are opinionated step-by-step guides to help you get familiar
with concepts. For more detailed information on specific
topics, see :doc:`/guides/index`.
8 changes: 8 additions & 0 deletions docs/content/users/modules/core/swatches.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
tags:
- Modules
---

# Swatches

Find a good description at: https://sherocommerce.com/tutorial-configurable-swatches-in-magento/
2 changes: 2 additions & 0 deletions docs_includes/abbreviations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*[HTML5]: Hyper Text Markup Language
*[JSON]: JSON (JavaScript Object Notation) is a lightweight data-interchange format.
*[Mailpit]: Mailpit is a small, fast, low memory, zero-dependency, multi-platform email testing tool & API for developers.
*[MariaDB]: One of the possible databases OpenMage is compatible to.
*[MySQL]: One of the possible databases OpenMage is compatible to.
*[n98-magerun]: The n98 magerun cli tools provides some handy tools to work with Magento from command line.
*[OpenMage]: This project
*[phpMyAdmin]: phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web.
Expand Down
8 changes: 8 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ extra:
Install: install
JavaScript: js
Modules: modules
PHP-7.4: php
PHP-8.0: php
PHP-8.1: php
PHP-8.2: php
PHP-8.3: php
PHP-8.4: php
TinyMCE: tinymce
Security: security

Expand Down Expand Up @@ -176,12 +178,16 @@ nav:
- 'Events':
- developers/events/list.md
- 'Guides':
- developers/guides/index.md
- developers/guides/dynamic-blocks.md
- developers/guides/observer.md
- 'Tools':
- developers/ddev.md
- developers/phpstorm.md
- 'Multistore':
- developers/error-pages.md
- 'Tutorials':
- developers/tutorials/index.md
- 'Documentation':
- developers/mkdocs.md
- 'Modules':
Expand All @@ -192,6 +198,8 @@ nav:
- users/modules/logging.md
- users/modules/products.md
- users/modules/social.md
- 'Core':
- users/modules/core/swatches.md
- 'Payment':
- users/modules/payment/bitcoin.md
- 'Themes':
Expand Down