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 916 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 916 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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
component only in child pages
#3
(2016-03-04, 16:04:43)Bigin Wrote: ...Or generally, when the same rules apply to all child pages on entire template, you can see whether page has parent then show your component:

Code:
if(!empty(get_parent(false))) {
    // show component ...
}

It's that last one I need, thanks but it is giving me -
Fatal error: Can't use function return value in write context inĀ /var/sites...



Just to be clear I haveĀ 
PHP Code:
<?php if(!empty(get_parent(false))) { get_component('tagline')}; ?>
Reply


Messages In This Thread
component only in child pages - by Timbow - 2016-03-04, 10:37:45
RE: component only in child pages - by Bigin - 2016-03-04, 16:04:43
RE: component only in child pages - by Timbow - 2016-03-05, 03:13:18
RE: component only in child pages - by Bigin - 2016-03-05, 03:28:23
RE: component only in child pages - by Timbow - 2016-03-05, 07:19:34
RE: component only in child pages - by Bigin - 2016-03-05, 08:20:59
RE: component only in child pages - by Timbow - 2016-03-05, 09:03:05



Users browsing this thread: 1 Guest(s)