EC-CUBE / EC-CUBE/ec-cube

マイページのナビゲーションを拡張する方法の提供

Open
#4,645 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
PHP
Stars
788
Forks
719
Avg merge
3d 20h
Merged PRs (30d)
45

Description

## 概要(Overview)
マイページにページを拡張するプラグインは多いと思いますが、私の知る限りではマイページのナビゲーションは Twig の `TemplateEvent`を拾って jQuery を使って DOM を動的に生成する方法しか提供されていないと思います。これだと、ナビゲーションメニューを追加するためにマイページの全ての Twig にイベントをセットしなければなりません。また、Chrome だと jQuery で DOM が ready になった段階で要素を追加するとチラツキが発生して見た目もよくありません。

また、別のプラグインがすでにマイページを拡張している場合に不整合が起こってしまいます。

## 期待する内容(Expect) or 要望 (Requirement)
プラグインでマイページにページを追加した際に、追加されたページを自動でナビゲーションに追加されるようにする方法を提供する。

## 実装案
`Page` モデルに親子関係の概念を持たせ、マイページの兄弟ページを列挙しナビゲーションを自動生成できると良いと思います。また、`Page` モデルに `order` プロパティを持たせて兄弟間の序列を決められるようにすれば、ナビゲーションの順序も制御できるのでは?と思っています。

### 環境 (environment)
+ EC-CUBE: 4.0.0
+ PHP: 7.3.20
+ DB:
- MySQL 5.7

## 関連情報 (Ref)

Contributor guide

Open the contributing guide

Research direction

Start by locating the My Page navigation entry points, the Page model, and the Twig TemplateEvent and jQuery DOM-generation path described in the issue. Determine how plugin-added pages can be discovered and ordered as sibling pages; done means navigation updates automatically without per-template events, visual flicker, or conflicts with other extensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
jquery, php
Domain
backend, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.