Hi,
I have a simple question about using anchors in links.
Example link: [[SamplePage#SampleAnchor]]
Is there any possible way known to get information about the used anchor in "SamplePage"?
For example with ParserFunction {{#ifeq: <here the anchor text>| compare text|.....}}?
Greetings
Frank Baxmann
Hi Frank,
Couldn't you just do:
[[SamplePage#SampleAnchor| Text you want here]]
Sent from my iPad
On Jan 25, 2015, at 8:45 AM, Frank Baxmann service@frankbaxmann.de wrote:
Hi,
I have a simple question about using anchors in links.
Example link: [[SamplePage#SampleAnchor]]
Is there any possible way known to get information about the used anchor in "SamplePage"?
For example with ParserFunction {{#ifeq: <here the anchor text>| compare text|.....}}?
Greetings
Frank Baxmann
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi Chris,
no you misunderstood.
The example link [[SamplePage#SampleAnchor]] is not on the "SamplePage". If someone clicks the link he gets the page from URL .../index.php/SamplePage#SampleAnchor
I want to switch things on the SamplePage and want to check if it is possible to get the #SampleAnchor info to use for switching.
If you know some other way to transfer a param from the calling page to the called page, that would be fine too. But I never read that this is possible in MW...
Greetings
Frank
On 25.01.2015 18:58, Chris Tharp wrote:
Hi Frank,
Couldn't you just do:
[[SamplePage#SampleAnchor| Text you want here]]
Sent from my iPad
On Jan 25, 2015, at 8:45 AM, Frank Baxmann service@frankbaxmann.de wrote:
Hi,
I have a simple question about using anchors in links.
Example link: [[SamplePage#SampleAnchor]]
Is there any possible way known to get information about the used anchor in "SamplePage"?
For example with ParserFunction {{#ifeq: <here the anchor text>| compare text|.....}}?
Greetings
Frank Baxmann
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi Frank,
The closest, I think, you'll find to what you're looking for is some type of Semantic Mediaiwki call or Cargo call (new mediawiki extension). I don't think it's possible in a standard Mediaiwki.
Sent from my iPad
On Jan 25, 2015, at 10:11 AM, Frank Baxmann service@frankbaxmann.de wrote:
Hi Chris,
no you misunderstood.
The example link [[SamplePage#SampleAnchor]] is not on the "SamplePage". If someone clicks the link he gets the page from URL .../index.php/SamplePage#SampleAnchor
I want to switch things on the SamplePage and want to check if it is possible to get the #SampleAnchor info to use for switching.
If you know some other way to transfer a param from the calling page to the called page, that would be fine too. But I never read that this is possible in MW..
Greetings
Frank
On 25.01.2015 18:58, Chris Tharp wrote: Hi Frank,
Couldn't you just do:
[[SamplePage#SampleAnchor| Text you want here]]
Sent from my iPad
On Jan 25, 2015, at 8:45 AM, Frank Baxmann service@frankbaxmann.de wrote:
Hi,
I have a simple question about using anchors in links.
Example link: [[SamplePage#SampleAnchor]]
Is there any possible way known to get information about the used anchor in "SamplePage"?
For example with ParserFunction {{#ifeq: <here the anchor text>| compare text|.....}}?
Greetings
Frank Baxmann
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi, as far as I know it's not possible to achieve that in pure wikitext, but the :target pseudo-class can help you. Suppose you have a page like this:
<div class="section" id="mysection"> Hi! </div> <div class="section" id="yoursection"> Hello! </div> <div class="section" id="anothersection"> Lorem ipsum. </div>
and a MediaWiki:Common.css like this:
.section { display: none; } .section:target { display: inherit; }
All sections will be hidden by default, but when visiting the page with #mysection, #yoursection, #anothersection, the selected one will magically appear.
Il 25/01/2015 17:45, Frank Baxmann ha scritto:
Hi,
I have a simple question about using anchors in links.
Example link: [[SamplePage#SampleAnchor]]
Is there any possible way known to get information about the used anchor in "SamplePage"?
For example with ParserFunction {{#ifeq: <here the anchor text>| compare text|.....}}?
Greetings
Frank Baxmann
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Thx,
this was just a sample.
In detail I have 10 different links on the calling page. All to the same SamplePage.
But on sample page I want to call a template, and each of the 10 links shall pass a different parameter into the template call.
On 25.01.2015 19:24, Ricordisamoa wrote:
Hi, as far as I know it's not possible to achieve that in pure wikitext, but the :target pseudo-class can help you. Suppose you have a page like this:
<div class="section" id="mysection"> Hi! </div> <div class="section" id="yoursection"> Hello! </div> <div class="section" id="anothersection"> Lorem ipsum. </div>
and a MediaWiki:Common.css like this:
.section { display: none; } .section:target { display: inherit; }
All sections will be hidden by default, but when visiting the page with #mysection, #yoursection, #anothersection, the selected one will magically appear.
Il 25/01/2015 17:45, Frank Baxmann ha scritto:
Hi,
I have a simple question about using anchors in links.
Example link: [[SamplePage#SampleAnchor]]
Is there any possible way known to get information about the used anchor in "SamplePage"?
For example with ParserFunction {{#ifeq: <here the anchor text>| compare text|.....}}?
Greetings
Frank Baxmann
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
btw. if someone gives me the php class where I can find this info it's enough too.
I use it in programming an extension anyway...
On 25.01.2015 19:24, Ricordisamoa wrote:
Hi, as far as I know it's not possible to achieve that in pure wikitext, but the :target pseudo-class can help you. Suppose you have a page like this:
<div class="section" id="mysection"> Hi! </div> <div class="section" id="yoursection"> Hello! </div> <div class="section" id="anothersection"> Lorem ipsum. </div>
and a MediaWiki:Common.css like this:
.section { display: none; } .section:target { display: inherit; }
All sections will be hidden by default, but when visiting the page with #mysection, #yoursection, #anothersection, the selected one will magically appear.
Il 25/01/2015 17:45, Frank Baxmann ha scritto:
Hi,
I have a simple question about using anchors in links.
Example link: [[SamplePage#SampleAnchor]]
Is there any possible way known to get information about the used anchor in "SamplePage"?
For example with ParserFunction {{#ifeq: <here the anchor text>| compare text|.....}}?
Greetings
Frank Baxmann
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org