GetSimple Support Forum
Sidebar issues - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Themes (http://get-simple.info/forums/forumdisplay.php?fid=10)
+--- Thread: Sidebar issues (/showthread.php?tid=2769)



Sidebar issues - leonku - 2012-02-16

Hello i was able to create my own theme and cutomise it but my question is is there a way i can have different side bar content on different pages that i create. It would be great if the sidebar content is created with the page its self.

http://star-leo.com/Previews/ign-cms/

Is an example of my home page but i want to have different content on my other pages that i create within


Sidebar issues - n00dles101 - 2012-02-16

Hi Welcome to the forums.

Just create different template files for each sidebar configuration that your require.

Then just assign the different template to whatever pages you want.

e.g. copy your template.php file to template2.php
change the sidebar code, then on the pages that you want that configuration change the template
under "page options" to template2.php

M


Sidebar issues - leonku - 2012-02-16

thank you but then if i have many pages i would have to create alot of temp files to show some content? and then what happens when i easily want to edit the content?

Is there away i can create sub content for a page like a small title and some small content for that page then i could call it in my sidebar file ?


Sidebar issues - mvlcek - 2012-02-16

leonku Wrote:thank you but then if i have many pages i would have to create alot of temp files to show some content? and then what happens when i easily want to edit the content?

Is there away i can create sub content for a page like a small title and some small content for that page then i could call it in my sidebar file ?

You can add a custom field 'sidebar' to your page using the I18N Custom Fields plugin and then add the it to the template using
Code:
<?php get_custom_field('sidebar'); ?>



Sidebar issues - leonku - 2012-02-16

mvlcek Wrote:<?php get_custom_field('sidebar'); ?>


thank you am almost getting there know how do i call the name of the custom field and also have it specifically call a certain page for a specific page so that it only appears where its supposed to appear and it doesnt appear on pages that i did not add a custom field.

Example 1 :

http://star-leo.com/Previews/ign-cms/index.php?id=what-is-lis

Example 2: http://star-leo.com/Previews/ign-cms/index.php?id=main-land-issues-in-uganda (no custom field attached and it shows an empty box )


Sidebar issues - leonku - 2012-02-16

this how far i am so far <?php return_custom_field($name, $echo=true); ?> but the label doesnt appear i need it to appear and also do away with the section not appearing on pages that i didnt assign a custom field .