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

Seo flag for pages indexing #1643

Open
wants to merge 2 commits 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
12 changes: 9 additions & 3 deletions oc-admin/themes/modern/pages/frm.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,15 @@ function ajaxfilemanager(field_name, url, type, win) {
<div class="input-description-wide">
<?php printLocaleDescriptionPage($locales, $page); ?>
</div>
<div>
<label><?php _e('Show a link in footer'); ?></label>
<?php PageForm::link_checkbox($page); ?>
<div class="form-controls">
<div class="form-label-checkbox">
<label><?php PageForm::link_checkbox($page); ?> <?php _e('Show a link in footer'); ?></label>
</div>
</div>
<div class="form-controls">
<div class="form-label-checkbox">
<label><?php PageForm::indexed_checkbox($page); ?> <?php _e('Index and include in sitemap.xml'); ?></label>
</div>
</div>
<div>
<?php osc_run_hook('page_meta'); ?>
Expand Down
11 changes: 7 additions & 4 deletions oc-includes/osclass/frm/Page.form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,17 @@ static public function internal_name_input_text($page = null) {
}

static public function link_checkbox($page = null) {
$checked = true;
if( is_array($page) && isset($page['b_link']) && $page['b_link']==0 ) {
$checked = false;
}
$checked = ! ( is_array($page) && isset($page['b_link']) && $page['b_link'] == 0 );

parent::generic_input_checkbox('b_link', "1", $checked);
}

static public function indexed_checkbox($page = null) {
$checked = ! ( is_array($page) && isset($page['b_indexed']) && $page['b_indexed'] == 0 );

parent::generic_input_checkbox('b_indexed', "1", $checked);
}

static public function multilanguage_name_description($locales, $page = null) {
$num_locales = count($locales);
if($num_locales > 1) echo '<div class="tabber">';
Expand Down