The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Tag to link to page X slug
#1
Maybe a silly question, but I have looked through the forum and wiki, and cant seem to find it.

I would like to add a link in the footer template to a page that is not listed in a menu.

Is there a tag similar to <?php get_page_slug(); ?> where you include the slug of the page rather than adding the full url to a link.

Sorry if I am phrasing this all wrong.

What I would like to do is:
<a href="<?php get_page_url('My_Slug'); ?>" title="<?php get_page_title('My_Slug'); ?>"> </a>

Which would output something like:
<a href="https://mysite/My_Cool_Page" title="My Cool Page Title"> </a>


GS Community Edition with php8.x compatibility, new features and much more!  Support Me


Reply
#2
PHP Code:
<?php $mySlug 'my-slug'?>
<a href="<?php echo find_url($mySlugreturnPageField($mySlug'parent')); ?>" title="<?php getPageField($mySlug'title'); ?>">...</a> 
Reply
#3
(2020-03-13, 01:48:09)Carlos Wrote:
PHP Code:
<?php $mySlug 'my-slug'?>
<a href="<?php echo find_url($mySlugreturnPageField($mySlug'parent')); ?>" title="<?php getPageField($mySlug'title'); ?>">...</a> 

I think that will work for me. Thank you Carlos for such a prompt reply Smile


GS Community Edition with php8.x compatibility, new features and much more!  Support Me


Reply




Users browsing this thread: 1 Guest(s)