]] .. item.title .. [[
diff --git a/src/page/dir.lua b/src/page/dir.lua
index d777100..9442cdc 100644
--- a/src/page/dir.lua
+++ b/src/page/dir.lua
@@ -30,17 +30,13 @@ return {
-- "parent = " .. util.stripPath(v.parent.path) .. " " ..
-- "matchpath = " .. util.stripPath(matchpath)
-- )
- if match(v.path, matchpath) then -- show parent folder if any
- local parent = app.cache.items[ v.parent.id ]
- if v.portal then
- trace("-- portal redirect")
- redirect = v.portal.url
- end
- if match(parent.path, app.opts.plugin_diskscan_dir) then -- add rootfolder if needed
- local root = app.cache.items[ app.opts.plugin_diskscan_dir ]
- --res.items[ root.id ] = root
- end
- end
+ --if match(v.path, matchpath) then -- add parent folder if any
+ --res.items[ v.parent.id ] = v.parent
+ -- if match(v.parent.path, app.opts.plugin_diskscan_dir) then -- add rootfolder if needed
+ -- local root = app.cache.items[ app.opts.plugin_diskscan_dir ]
+ -- res.items[ root.id ] = root
+ -- end
+ --end
-- add items from dir
if match(v.parent.path, matchpath) then
@@ -49,6 +45,15 @@ return {
res.items[ v.id ] = v
res.parent = parent
end
+ if not isroot then
+ res.items[ v.parent.id ] = {
+ view2D = false,
+ url = v.parent.url,
+ title = "parent world",
+ name = "parent world",
+ thumbnail = '',
+ }
+ end
end
end
end
@@ -57,7 +62,9 @@ return {
local data = util.merge({
url = req.param.url, -- query hint to render janus.url in iframe (index.html)
items = {},
- parent=res.parent
+ referrer = isroot and app.opts.plugin_federation_parent_url or util.getURL(),
+ parent=res.parent,
+ template=res.template
},{ opts = app.opts })
local i = 0
foreach( res.items, function(k,v)
@@ -70,10 +77,13 @@ return {
end
-- prioritize markup experience above binary 3D files as experience containers
if not data.item or (isMarkupExperience(v) and not isMarkupExperience(data.item)) then
+ -- update referrer url
+ data.referrer = util.getURL( v.view3D and v.parent.parent.url or v.parent.url )
data.item = v
data.title = data.item.title
data.parent = v.parent
data.url = app.opts.baseurl .. util.stripPath(v.url) -- because we are running in iframe
+ -- .. EscapeFragment( (v.url:match("#") and "&" or "#" ) .. 'janus.referrer=' .. EscapeFragment(v.referrer) )
if v.janusxr and (v.janusxr.jml or v.janusxr.aframe) then
-- what to do here? no generated portals?
data.janusxr = app.tpl( util.readfile(v.path), data )
diff --git a/src/page/footer.html b/src/page/footer.html
index b3ad9c1..6c79cbc 100644
--- a/src/page/footer.html
+++ b/src/page/footer.html
@@ -17,7 +17,7 @@
NLNET
- View from XR Device
+ View from XR Device
Content overview
About
|
diff --git a/src/page/header.html b/src/page/header.html
index be1e8ac..cfb4aba 100644
--- a/src/page/header.html
+++ b/src/page/header.html
@@ -37,6 +37,32 @@
{if true then
print( app.opts.plugin_global_topmenu_html:gsub("\n"," ") )
end}
+ {if template == "page/dir.html" then
+ print([[
]])
+ end}
+ {if template == "page/index.html" then
+ local sharedata = {
+ title = (item and item.title or opts.plugin_global_title)
+ }
+ print([[
+
+
+
+
+ ]])
+ end}
diff --git a/src/page/index.html b/src/page/index.html
index f5fde5c..6a83bb8 100644
--- a/src/page/index.html
+++ b/src/page/index.html
@@ -3,7 +3,7 @@ ${header}
-