[pmwiki-users] How to apply data-rel to an anchor?
Martin Kerz
mkerz at me.com
Fri Feb 3 05:21:21 CST 2012
Thanks a lot. That worked like charm.
If I might ask another question. What would I have to do if I wanted to be able to apply, say "data-rel" to different tags., and specify it in the wiki source:
In your example, I would like to be able to say:
%data-rel=dialog apply=div%
or
%data-rel:dialog apply=a%
Is that possible, too?
Again, thanks a lot.
M.
Am 03.02.2012 um 09:32 schrieb Petko Yotov:
> You need the following code in config.php :
>
> $WikiStyleAttr['data-rel'] = 'a';
> $WikiStyle['jqdl']['data-rel'] = 'dialog';
>
> Then you can use %jqdl%[[link]]%% or %data-rel:dialog%[[link]]%%
> to produce a link with an attribute data-rel="dialog".
>
> Petko
>
> On Thursday 02 February 2012 11:41:28, Martin Kerz wrote :
>> Okay, by adding
>>
>> $WikiStyleCSS[] = 'data-rel';
>> $WikiStyleApply['a'] = 'a';
>>
>> I get it to appear, but it is embedded in a style attribute, i.e., I now
>> have:
>>
>> <a class="wikilink" style="data-rel: dialog;"
>> href="/Wiki/PageActionsDialog1">This Page</a>
>>
>> Am I on the right track?
>>
>> Thanks a lot in advance!
>>
>> Martin
>>
>> Am 01.02.2012 um 21:44 schrieb Martin Kerz:
>>> Hi there,
>>>
>>> I try to apply a data-rel attribute to an anchor tag. I did the following
>>> in a custommarkup.php file
>>>
>>> SDV($WikiStyle['jqdialoglink'], array('data-rel'=>'dialog',
>>> 'apply'=>'a'));
>>>
>>> And tried the following syntax on my page:
>>>
>>> * %jqdialoglink%[[PageActionsDialog1|This Page ]]%%
>>>
>>> What I want to achieve is something like this:
>>>
>>> <a class="wikilink" data-rel="dialog"
>>> href="/Wiki/PageActionsDialog1">This Page</a>
>>>
>>> Unfortunately, the data-rel="dialog" isn't showing up. What am I missing
>>> here?
>>>
>>> Thanks, as always, for your help!
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
More information about the pmwiki-users
mailing list