Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
84b72a08
Commit
84b72a08
authored
7 years ago
by
Oliver Bertuch
Browse files
Options
Downloads
Patches
Plain Diff
Extend theming documentation about how to link to www resources in a custom module.
parent
3cb12e1c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/simplesamlphp-theming.md
+21
-3
21 additions, 3 deletions
docs/simplesamlphp-theming.md
with
21 additions
and
3 deletions
docs/simplesamlphp-theming.md
+
21
−
3
View file @
84b72a08
Theming the user interface in SimpleSAMLphp
Theming the user interface in SimpleSAMLphp
===========================================
===========================================
<!--
<!--
This file is written in Markdown syntax.
This file is written in Markdown syntax.
For more information about how to use the Markdown syntax, read here:
For more information about how to use the Markdown syntax, read here:
http://daringfireball.net/projects/markdown/syntax
http://daringfireball.net/projects/markdown/syntax
-->
-->
...
@@ -86,7 +86,7 @@ For example, to override the `preprodwarning` template, (the file is located in
...
@@ -86,7 +86,7 @@ For example, to override the `preprodwarning` template, (the file is located in
Say in a module
`foomodule`
, some code requests to present the
`bar.php`
template, SimpleSAMLphp will:
Say in a module
`foomodule`
, some code requests to present the
`bar.php`
template, SimpleSAMLphp will:
1.
first look in your theme for a replacement:
`modules/mymodule/themes/fancytheme/foomodule/bar.php`
.
1.
first look in your theme for a replacement:
`modules/mymodule/themes/fancytheme/foomodule/bar.php`
.
2.
If not found, it will use the base template of that module:
`modules/foomodule/templates/bar.php`
2.
If not found, it will use the base template of that module:
`modules/foomodule/templates/bar.php`
...
@@ -96,3 +96,21 @@ Adding resource files
...
@@ -96,3 +96,21 @@ Adding resource files
You can put resource files within the www folder of your module, to make your module completely independent with included css, icons etc.
You can put resource files within the www folder of your module, to make your module completely independent with included css, icons etc.
```
modules
└───mymodule
└───themes
└───www
└───logo.png
└───style.css
```
Reference these resources in your custom PHP templates under
`themes/fancytheme`
by using a generator for the URL:
```
php
<?php
echo
SimpleSAML_Module
::
getModuleURL
(
'mymodule/logo.png'
);
?>
```
Example for a custom CSS stylesheet file:
```
html
<link
rel=
"stylesheet"
type=
"text/css"
href=
"<?php echo SimpleSAML_Module::getModuleURL('mymodule/style.css'); ?>"
/>
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment