Comments (4)
You are not missing anything. The current way of handling fragments is due to the developmental nature of the plugins: at the moment, the fragments are used to build links, but they are not rendered to HTML. This is because I have yet to find a clean way to mesh the generation of these identifiers with the default wiki header identifiers.
What does work is the following:
===== item1 =====
<data myitem #item1>
SampleField: One
</data>
That way the rendered links will jump you to the header.
Does that help you out?
from dokuwiki-strata.
Yes it kind of does. And I've been able to avoid duplicated headers by using Wrap plugin and including a custom CSS class this way:
.wrap_header-hidden h2 {
visibility: hidden;
position: absolute;
}
Then my data entry looks like this:
<WRAP header-hidden>
===== item1 =====
</WRAP>
<data myitem #item1>
SampleField: One
</data>
So let's say this workaround works for me
Thank you!!
from dokuwiki-strata.
Good to hear!
I'll leave this issue open, since there should be a solid solution for this problem. (Workarounds are nice, but we really want this to work out-of-the-box.)
from dokuwiki-strata.
Hi.
I managed to write a little mod and got it working. Now there's no need to include the headers (===== item1 =====
) nor the CSS to hide them as stated in some posts above :)
Just wanted to share in case anyone is interested.
Strata Plugin version 2017-03-28
File: lib\plugins\strata\syntax\entry.php
Replace the original line #252
$R->doc .= '<div class="strata-entry" '.(isset($currentPosition)?'id="'.$currentPosition.'"':'').'>';
by all this code:
// ## internal link MOD ##
$divid = $data['entry'];
resolve_pageid(getNS($ID),$divid,$exists); // convert entry title to id using DokuWiki function
// translate id to match the link generated by Strata Plugin
$divid = preg_replace('/[\.:]/','',$divid); // remove unwanted characters
$divid = preg_replace('/#/','_',$divid); // replace particular characters
if (isset($previousPosition) or isset($nextPosition)) {
// has fragments
if (!isset($previousPosition)) $R->doc .= '<span id="'.$divid.'"><span>'; // added as bookmark to first fragment
$R->doc .= '<div class="strata-entry" '.(isset($currentPosition)?'id="'.$currentPosition.'"':'').'>'; // yep, that's the original line
} else {
// single entry
$R->doc .= '<div class="strata-entry" '.(isset($currentPosition)?'id="'.$divid.'"':'').'>'; // use our generated id instead
}
// ## END internal link MOD ##
You may use this code to test it:
~~NOCACHE~~
<data myitem #item1>
SampleField: One
</data>
\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\
<data myitem #item2>
SampleField: Two
</data>
\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\
<data myitem #item3>
SampleField: Three
</data>
\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\
<data myitem #item4>
SampleField: Four
</data>
\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\
<data myitem #item4>
SampleExtraField: Another fragment
</data>
\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\
<table ?item>
?item is a: myitem
</table>
Now you can click on the links at the table and they take you to the related data entry.
Greetings :)
from dokuwiki-strata.
Related Issues (20)
- Preventing display of input data HOT 3
- How to get data to refresh? HOT 1
- Improved parsing/error messages
- link style and image sizes HOT 7
- hard limit results HOT 3
- Output a single value into another plugin's syntax HOT 1
- Multiple entries on one page HOT 2
- <table> tag not working properly HOT 5
- References with namespace don't work HOT 5
- Multiple values for expressions with * can't be used HOT 2
- ODT export issue HOT 1
- Effect of the "useheading" configuration setting HOT 2
- ~~INFO:stratatypes~~ crashes wiki HOT 4
- Table gives correct result only when predicate not correctly written HOT 4
- Suggestion: Include a query from another page HOT 4
- Type "wiki" does not work HOT 4
- Incorrect output for @sum aggregate HOT 2
- SQLite Access can not access strata tables HOT 2
- Scoped mode HOT 2
- Page title [[]] as part of Fragment HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dokuwiki-strata.