Author Topic: Category Cloud in Main Content Area  (Read 503 times)

0 Members and 1 Guest are viewing this topic.

Offline bschneider5

  • Newbie
  • *
  • Posts: 4
    • View Profile
Category Cloud in Main Content Area
« on: 30 January 2016, 09:08:18 PM »
There's a category cloud widget already for the sidebar, but I would like to have on in the main content area to replace my current, boring, category layout. Is this available or doable without too much trouble? THis is for version 4.2.2

Offline bruleoadmin

  • Owner / Admin / Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 1992
    • Skype - torquepoint
    • View Profile
    • Bruleo
Re: Category Cloud in Main Content Area
« Reply #1 on: 01 February 2016, 01:15:07 AM »
Very easy!

If for 4.2.2, Just take the existing side widget you want for the cental area and do the following :

1) Copy and rename the main folder for the widget you want to make available for the main area (i.e. CategoryCloudMain).

2) Open the renamed folder and rename the main PHP file in it to the same as you named the folder (i.e.  CategoryCloudMain.php)

3) Open the file you just renamed and
    a) Rename the fist 'class' to whatever you named the folder.
    b) Rename the first 'function' to whatever you named the folder.

4) Open the config.xml in the folder you renamed and change :
   
Code: [Select]
<zonetype>VERTICAL</zonetype>
   TO
 
Code: [Select]
 <zonetype>CENTRAL</zonetype>

5) Upload the entire folder to your widgets folder and install in admin.

DONE.

Please note that the above will NOT work on versions higher than 4.2.2.

Bruce

Offline bschneider5

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Category Cloud in Main Content Area
« Reply #2 on: 01 February 2016, 02:25:44 AM »
I'll give it a try, thanks!


Offline bschneider5

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Category Cloud in Main Content Area
« Reply #4 on: 01 February 2016, 04:36:22 AM »
I think I got it. I had to adjust the width, and for some reason the title isn't showing, but it's pretty much doing what I wanted it to. Thanks!

Offline bruleoadmin

  • Owner / Admin / Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 1992
    • Skype - torquepoint
    • View Profile
    • Bruleo
Re: Category Cloud in Main Content Area
« Reply #5 on: 01 February 2016, 03:54:28 PM »
The title not appearing is due to the way the main template files are coded. 

Unfortunately, there is an error (missing code) in virtually all phpLD templates that causes this. If you look at the widget code for the widget templates in your main template folder and compare the formatting code in the vertical widget files to the main area ones, you should see what's needed.

There are a couple of other errors in the main widget code as well.  For example, the way it is coded to have divs inside list elements etc. This is not w3c compliant and can also cause list bullets to show in main areas.

Also, one of the main area widget code is incorrectly specified as the side widget code... can't remember which one without looking.

Assuming it's not been changed in your template, widget code for the main areas are contain in the following templates :

top_bar.tpl
footer.tpl
detail.tpl
article.tpl

Bruce

Tags:
 

SPONSORS