Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sidebars for child pages if statement
Author Message
texaswalker Offline
Junior Member

Posts: 1
Joined: Jun 2012
2012-06-10 16:11:14
Sidebars for child pages if statement
Lets say I have a parent page and multiple sub pages, how would I go about to display that same sidebar for each of the sub pages? Without having to manually write each line:

<?php if (return_page_slug()=='page') get_i18n_component('mycomponent'); ?>

Im sure that would take longer to load with multiple lines of code, how would I go about my situation.

I apologize for my lack of php knowledge.

I was thinking about putting the sub pages in a array after the parent, but i believe there is a much faster way of doing this. Which is why im here!

UEFA 2012!
Find all posts by this user Quote this message in a reply
mvlcek Offline
Posting Freak

Posts: 1,741
Joined: Jan 2011
2012-06-10 16:23:12
Sidebars for child pages if statement
texaswalker wrote:Lets say I have a parent page and multiple sub pages, how would I go about to display that same sidebar for each of the sub pages?

Code:
<?php if (return_parent()=='myparent') get_i18n_component('mycomponent'); ?>

I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)

Generate Leads from Documents vCard Hosting