The following warnings occurred:
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message
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
/printthread.php 203 postParser->parse_message



GetSimple Support Forum
Conditional tags - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8)
+--- Thread: Conditional tags (/showthread.php?tid=1146)



Conditional tags - Live - 2010-11-27

Hello!

Im new to GS and i was searching some conditional tags! for example IF HOME, or IF INDEX, if page XXXX do this.....

are something similar available?

thanks.


Conditional tags - Live - 2010-11-27

I think i can use template! Smile


Conditional tags - yojoe - 2010-11-27

you can base on page names (use their slugs), or their parents and serve the content you want


Conditional tags - Carlos - 2010-11-27

@Live

Insert something like this in your template.php

Code:
<?php
if (return_page_slug()=='index') {
  echo 'Hello, this is the index page!';
}
?>



Conditional tags - Carlos - 2010-11-27

yojoe Wrote:you can base on page names (use their slugs), or their parents and serve the content you want

About checking parents... I hadn't realised there are return_parent() and get_parent() functions... they're not listed in the docs http://get-simple.info/docs/theme-codex/


Conditional tags - yojoe - 2010-11-27

look at the functions located in common or theme functions files within admin/inc directory Wink

with slugs and parents you can create conditionals you need.
The problem is with automating it seamlessly, when a user changes page name or create a new one. You could base on a prefix string in page name.


Conditional tags - Connie - 2011-04-28

Carlos Wrote:About checking parents... I hadn't realised there are return_parent() and get_parent() functions... they're not listed in the docs http://get-simple.info/docs/theme-codex/

I added these 2 tags to the WIKI, but I ask to add a correct explanation, as I am not so firm in that!


Conditional tags - hameau - 2011-04-28

Connie Wrote:I added these 2 tags to the WIKI, but I ask to add a correct explanation, as I am not so firm in that!
This is an old thread and return_parent() was depreciated for v3.0.

There is phpdoc format help for get_parent() in admin/inc/theme_functions.php:
Code:
/**
* Get Page Parent Slug
*
* This will return the slug value of a particular page's parent
*
* @since 1.0
* @uses $parent
*
* @param bool $echo Optional, default is true. False will 'return' value
* @return string Echos or returns based on param $echo
*/



Conditional tags - Connie - 2011-04-28

Thanks, Nick

I took off that one tag and added the explanation to the other one

Thanks!

Connie


Conditional tags - hameau - 2011-04-28

Now that the source is all documented with phpdoc comments (V3.0+), it would be really nice to have phpDocumentor produce something – always up-to-date – for the wiki ...

There's a nice example at, ahem some other cms site.


Conditional tags - RobA - 2011-04-29

hameau Wrote:This is an old thread and return_parent() was depreciated for v3.0.

Question for devs- could depreciated functions please be changed to generate a warning message when site is is in debug mode?

-Rob A>


Conditional tags - [/root.] - 2011-08-31

Version 3.1 Beta r525

Code:
<?php if (get_parent()=='slug'){ ?>
this conditional is not working but this

Code:
<?php if (return_parent()=='slug'){ ?>

works, even it's a depreciated function.


Conditional tags - Carlos - 2011-08-31

By default get_parent() echoes the parent but does not return it.
The correct way would be:
Code:
<?php if (get_parent(false)=='slug'){ ?>
(BTW I use 0 instead of false, it's the same)