Skip to content
Snippets Groups Projects
Commit cadb2a40 authored by alvaro's avatar alvaro
Browse files

urifragment filter similar to hostname filter

service <title> based on the service's name
parent 6d5ab885
No related branches found
No related tags found
No related merge requests found
...@@ -2,12 +2,8 @@ ...@@ -2,12 +2,8 @@
class Haanga_Extension_Filter_Urifragment class Haanga_Extension_Filter_Urifragment
{ {
static function generator($compiler, $args) static function generator($cmp, $args)
{ {
if (count($args) != 1) { return hexec('parse_url', $args[0], hconst('PHP_URL_FRAGMENT'));
$compiler->Error("URIFragment only needs one parameter");
}
return hexec('array_pop', hexec('split', '#', $args[0]));
} }
} }
...@@ -13,6 +13,7 @@ SELECT DISTINCT ?resource WHERE { ...@@ -13,6 +13,7 @@ SELECT DISTINCT ?resource WHERE {
[] a ?resource . [] a ?resource .
} }
} }
LIMIT 10
QUERY` QUERY`
viewHtml=`cat <<VIEW viewHtml=`cat <<VIEW
...@@ -22,11 +23,11 @@ viewHtml=`cat <<VIEW ...@@ -22,11 +23,11 @@ viewHtml=`cat <<VIEW
<html xmlns="http://www.w3.org/1999/xhtml" {% for i, ns in base.ns %}xmlns:{{i}}="{{ns}}" <html xmlns="http://www.w3.org/1999/xhtml" {% for i, ns in base.ns %}xmlns:{{i}}="{{ns}}"
{%endfor%}version="XHTML+RDFa 1.0" xml:lang="en"> {%endfor%}version="XHTML+RDFa 1.0" xml:lang="en">
<head> <head>
<title>My new Service</title> <title>$1</title>
<link href="{{lodspk.baseUrl}}css/basic.css" rel="stylesheet" type="text/css" media="screen" /> <link href="{{lodspk.baseUrl}}css/basic.css" rel="stylesheet" type="text/css" media="screen" />
</head> </head>
<body> <body>
<h1>Classes available</h1> <h1>10 Classes available in this triple store</h1>
<ul> <ul>
{% for row in models.main %} {% for row in models.main %}
<li><a href="{{lodspk.baseUrl}}special/instances/{{ row.resource.curie }}">{{row.resource.curie}}</a></li> <li><a href="{{lodspk.baseUrl}}special/instances/{{ row.resource.curie }}">{{row.resource.curie}}</a></li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment