Skip to content

Commit 7a36b4f

Browse files
committed
get site url and cp trigger dynamically
1 parent 970d715 commit 7a36b4f

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/templates/settings.twig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,13 @@
4141

4242
{% block content %}
4343
{% if sections is empty %}
44-
<p>{{ 'configureSections'|t('entry-type-rules')|raw }}</p>
44+
<div class="zilch">
45+
<p>{{ 'configureSections'|t('entry-type-rules', {'url' : siteUrl ~ craft.app.config.general.cpTrigger ~ '/settings/sections'})|raw }}</p>
46+
</div>
4547
{% elseif not craft.entries.count() %}
46-
<p>{{ 'configureEntries'|t('entry-type-rules')|raw }}</p>
48+
<div class="zilch">
49+
<p>{{ 'configureEntries'|t('entry-type-rules', {'url' : siteUrl ~ craft.app.config.general.cpTrigger ~ '/entries'})|raw }}</p>
50+
</div>
4751
{% else %}
4852

4953
{% if configOverride %}

src/translations/en/entry-type-rules.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@
3838
'Limit which user groups can add new entries for the entry type.' => 'Limit which user groups can add new entries for the entry type.',
3939
'Admin users will always be able to add new entries.' => 'Admin users will always be able to add new entries.',
4040
'Entries' => 'Entries',
41-
'configureSections' => 'You need to <a href="/admin/settings/sections">configure some Sections</a> first.',
42-
'configureEntries' => 'You need to create some entries first.</p>',
41+
'configureSections' => 'You need to <a href="{url}">configure some Sections</a> first.',
42+
'configureEntries' => 'You need to create some <a href="{url}">entries</a> first.</p>',
4343
];

0 commit comments

Comments
 (0)