Oba-san
- Join Date:
- Sep 2003
- Location:
- Ohio
- Posts:
- 62,757
- Plugin Contributions:
- 1
Need SideBox to show in One Catagory Only
What are the real filenames used for FILE 1, FILE 2 and FILE 3? :unsure:
Views: 7,335
Oba-san
What are the real filenames used for FILE 1, FILE 2 and FILE 3? :unsure:
Totally Zenned
Sorry........
FILE1: dynamic_categories_sidebox_defines.php
FILE2: dynamic_categories_sidebox.php
FILE3: tpl_dynamic_categories_sidebox.php
Oba-san
After loading these files, did you then go to the Tools ... Layout Boxes Controller ... and turn on the sidebox?
Totally Zenned
Yes, the box works perfectly well with the code that's in place... that's not the problem :-)
the problem is how to get a specific category to appear in the contents of the box... here, like this:

When I click on the Childrenswear||Coats & Jackets category circled, it makes the new sidebox appear (Kids Jackets).
Now, these size categories (Age 4-5 etc.) are generated by the HTML code linking to these category URL's (input HTML coe between the apostrophes in FILE1).
The problem is that they will always appear there, even if they are not active categories (empty categories).
I am looking for a way to make the Age 4-5 etc., categories appear only when the categories are active.... probably by using PHP code to generate/poplulate the menu instead of HTML
Now you see why it's maybe beyond my capabilities?
Totally Zenned
If the above is a bit too tricky then I can live without it for now... thanks for all your time though...
Oba-san
This code would make a link for SOME NAME to with the cPath set to 1_8 ...
$content .= '<h1>' . TEXT_DYNAMIC_CATEGORIES_SIDEBOX . '</h1>';
$content .= '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . '1_8') . '">' . 'SOME NAME' . '</a> ';
Zen Follower
hi, Linda,
Could you please also help to check my problem:D
I just want to enable or disable certain sidebox (not whole left or right column)for certain pages,
for example, want to enable **subscribe sidebox **on contact_us page
what i can do to achieve this? your suggestion would be highly appreciated. thanks.:clap:
New Zenner
Hi , I wanted a sidebox to show only in main page , kinda sorted out with show categoryID=0 , it doesn't show on other categories and products but still shows in conditions , privacy , contact pages , any advice ?
New Zenner
Problem solved by adding manually each page (login , logoff , contact , privacy etc) that I do not want to display the sidebox , maybe not the most elegant solution but it works .
Black Belt
You can use ```php
if ($this_is_home_page) {
//your code
}
Oba-san
Jerry5763837:
hi, Linda,
Could you please also help to check my problem:D
I just want to enable or disable certain sidebox (not whole left or right column)for certain pages,
for example, want to enable **subscribe sidebox **on contact_us pagewhat i can do to achieve this? your suggestion would be highly appreciated. thanks.:clap:
Look at how the tell_a_friend sidebox is done where it says to not show on the tell a friend page ...
if (!($_GET['main_page']==FILENAME_TELL_A_FRIEND)) $show_tell_a_friend = true;
You can do something similar by adding a code like this to that sidebox ...
I have not used that so you will kind of have to wing it ... but that example may help you using something like:
if (($_GET['main_page']==FILENAME_CONTACT_US)) {
$show_your_variable_here = true;
} else {
$show_your_variable_here = false;
}
Then look at how the if surrounds the code as to whether or not it runs ...
New Zenner
Thank you Glenn , works great .
Tell staff why this post should be reviewed.