Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nofollow and noindex feature #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions grails-app/domain/spud/cms/SpudPage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class SpudPage {
Date dateCreated
Date lastUpdated

// SEO
Boolean nofollow = false;
Boolean noindex = false;

static mapping = {
def cfg = it?.getBean('grailsApplication')?.config
datasource(cfg?.spud?.core?.datasource ?: 'DEFAULT')
Expand Down
19 changes: 18 additions & 1 deletion grails-app/views/spud/admin/pages/_form.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,26 @@
<g:checkBox name="page.published" checked="${page?.published}"/> Published
</label>
</div>

</div>
</div>
<div class="form-group">
<div class="col-sm-8 col-sm-offset-2">
<div class="checkbox">
<label>
<g:checkBox name="page.nofollow" checked="${page?.nofollow}"/> Enable NoFollow
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-8 col-sm-offset-2">
<div class="checkbox">
<label>
<g:checkBox name="page.noindex" checked="${page?.noindex}"/> Enable NoIndex
</label>
</div>
</div>
</div>
<div class="form-group">
<label for="page.notes" class="control-label col-sm-2">Notes</label>
<div class="col-sm-8">
Expand Down