你如何解决“非结构化”问题?在PHP导航? [英] How do you solve "unstructured" navigation in PHP?

查看:142
本文介绍了你如何解决“非结构化”问题?在PHP导航?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个庞大的基于PHP的CMS管理网页。
所有项目均以树结构组织。
当我编辑一个项目时,后退按钮通常指向它的父项目。
因此,通常的工作流程是在树中导航。



现在需要一个工作流程,跳转到其他项目例如,当用户正在编辑网页时,他们可能希望打开页面附加到的模板(另一个项目是完全的不同的分支),在那里做一个改变,点击保存后会返回到他们正在编辑的页面。



目前,我使用

  domain.com/admin/template/edit?from=/frontpage/edit 

其中from变量确定保存和取消按钮的目标网址。



当路径变得太长和复杂时,这可以工作到某个点。例如,如果用户


  • 编辑页面

  • ,将会打开附加的模板
  • >
  • 在前端视图中预览该模板

  • 然后希望无缝地回到他们正在编辑的页面?



现在,历史记录结束于最后一项,以便当用户从前端视图返回时,链接到原来的页面丢失,他们必须手动搜索它。



快速发生的另一个问题是,包含所有from值的GET URL变为太长或完全混乱:

  domain.com/admin/template/edit?from=/frontpage/edit&from= / somepage / edit 
& from = / template / preview& / from = template / edit& / from = template_preview ...

(你会得到这个漂移)

我已经通过打开单独的窗口来解决这个问题,但我真的很想实现一个无缝的单窗口工作流程,普遍适用,主要是因为多个窗口容易让用户感到困惑。

你如何解决这个问题?



您是否实现了一个强大的非结构化打开一个窗口(=一个用户使用不同的导航路径执行多种不同的操作)?

你如何在用户界面?我可以想到的最佳方法是传递一个from值,指向数据库或会话中的临时记录。该记录包含有关当前路径的所有信息,因此可以始终提供正确的返回页面x值。



我最想听到的就是成功实施这个的人的经验,以及他们是如何做到的。

解决方案

只是一些建议



预览问题:在IFRAME中预览,所以历史不会丢失? / p>

乱七八糟的URL问题:如果每个页面都有某种关键字,而不是URL路径



<$ p $
/ template / preview = 651,
(即/ frontpage / edit = 952,
/ frontpage / edit& from = / somepage / edit = 763)你可以将它们串在一起,例如:template / edit = 612,
template_preview = 866等)

在PATH_INFO中是这样的:

  domain.com/admin/template/edit/952/763/651/612/866 


I have a large, PHP-based CMS that manages web pages. All items are organized in a tree structure. When I edit an item, the "back" button usually points to its parent item. So, the usual workflow is navigating through the tree.

Now every now and then, the need arises for a workflow that "jumps" to other items without regard for the structure.

For example, when a user is editing a web page, they may want to open the template the page is attached to (another item in a completely different branch), make a change there, and when clicking "save" expect to come back to the page they were editing.

At the moment, I solve this using

domain.com/admin/template/edit?from=/frontpage/edit

where the "from" variable determines the target URLs of the "save" and "cancel" buttons.

This works up to a certain point when the path becomes too long and complex. For example, what if the user

  • edits a page
  • opens the attached template
  • previews that template in the front-end view
  • and then expects to be seamlessly taken back to the page they were editing?

Right now, the "history" ends at the last item so that when the user returns from the front-end view, the link to the original page is lost, and they have to search it by hand.

Another problem that can happen quickly is that the GET URL containing all the "from" values becomes too long, or totally chaotic:

domain.com/admin/template/edit?from=/frontpage/edit&from=/somepage/edit
&from=/template/preview&/from=template/edit&/from=template_preview ...

(you get the drift)

I have solved this elegantly by opening separate windows in the past, but I really want to implement a seamless one-window workflow that works universally, mainly because multiple windows tend to confuse users.

How do you solve this?

Have you implemented a robust "unstructured" navigation that works well with multiple windows open (=one user doing multiple different things with different navigation paths)?

How do you go about this on the user interface side?

The best approach I can think of is passing on a "from" value that points to a temporary record in a database or session. That record contains all the information about the current path, and can thus always provide the right "back to page x" value.

What I would like to hear most is experiences from people who have successfully implemented this, and how they did it.

解决方案

Just a couple suggestions

Preview Problem: preview in an IFRAME, so the history doean't get lost?

Cluttered URL problem: If you have some sort of key for each page, other than the URL path

(i.e. /frontpage/edit = 952,
/frontpage/edit&from=/somepage/edit = 763,
/template/preview = 651,
template/edit = 612,
template_preview = 866 etc.)

you could string them together in the PATH_INFO like so:

domain.com/admin/template/edit/952/763/651/612/866

这篇关于你如何解决“非结构化”问题?在PHP导航?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆