简体   繁体   English

Umbraco临时页面

[英]Umbraco temporary page

I was building an Umbraco 7.4.3 site, and I was ended up to this situation. 我当时正在建立一个Umbraco 7.4.3网站,但最终遇到了这种情况。 I have a node structure inside Umbraco like this. 我在Umbraco内部有这样的节点结构。

例

So, I have a Student and Teacher node under Home. 因此,我在“家”下有一个“学生和老师”节点。

The Student node will show a detail about student. 学生节点将显示有关学生的详细信息。

Now I want to have a page where I can edit a Student, "I want a separate page (not popup) linking to a page where I can edit a student", something like a /edit-student/?id=2. 现在,我想要一个可以编辑学生的页面,“我想要一个单独的页面(而不是弹出窗口)链接到可以编辑学生的页面”,类似于/ edit-student /?id = 2。

But in order do that I will end up in a structure like this, see screenshot 但是为了做到这一点,我将最终得到一个这样的结构,请参见屏幕截图

例

See? 看到? I have an extra node EditStudent just to have a page where I can edit student, I can call this page by /Student/EditStudent/?id=2 我有一个额外的EditStudent节点,只是有一个页面可以编辑学生,我可以通过/ Student / EditStudent /?id = 2来调用此页面

But I don't want to have this node "EditStudent", I feel it was making my node structure dirty. 但是我不想让这个节点为“ EditStudent”,我觉得这使我的节点结构变脏了。

I want a solution that I can still have a url like this /Student/EditStudent/?id=2 but I don't want to see a node "EditStudent" under Student or somewhere else inside my Umbraco. 我想要一个解决方案,使我仍然可以拥有一个像/ Student / EditStudent /?id = 2这样的url,但是我不想在Student或Umbraco内的其他位置看到“ EditStudent”节点。

Is this possible to happen? 这可能发生吗? something like a virtual url (but not aspx) pages. 类似于虚拟网址(而不是aspx)的网页。

Found the answer I posted at our.umbraco.org forum. 找到了我在our.umbraco.org论坛上发布的答案。

Just create a template and Ill name it as "Edit", then you can access like this url: /Student/Edit/, and of course you can add parameters. 只需创建一个模板并将其命名为“ Edit”,然后您就可以访问以下网址:/ Student / Edit /,当然还可以添加参数。

If there is no other node name "Edit" found under Student then it will use "Edit" template as alternative. 如果在Student下未找到其他节点名称“ Edit”,则它将使用“ Edit”模板作为替代。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM