1
Xman04
Problem editing spotlight display for smartsection
  • 2007/8/17 21:04

  • Xman04

  • Not too shy to talk

  • Posts: 180

  • Since: 2004/7/12


I'm trying to modify the spotlight block for smartsection, so that I can display the poster of the article, the date of the article, and the category of the article. I'm using the bullet format of the spotlight block, which only displays the title of the article.

I successfully added the category, but for some reason the poster name and date will not show up.

For example, I added the following code to the smartsections_item_spot.html file:

<div style="font-weight: bold; font-size: 10px; color: navy;">Author:&nbsp;<{$item.poster}></div>


The above does not generate the poster name. The poster variable I used above is used in other blocks for smartsection, and it works fine. However, it doesn't work when I add it to the spotlight block. The same thing happens with the date. Any ideas as to what I'm doing wrong?

Also, ideally, I would like the spotlight to display the poster's real name (rather than their ID).

Dave

2
Xman04
Re: Problem editing spotlight display for smartsection
  • 2007/8/20 19:43

  • Xman04

  • Not too shy to talk

  • Posts: 180

  • Since: 2004/7/12


The ability to display both the category and subcategory of an article in the spotlight block would be very useful too. I wish I had the PHP knowledge to be able to do this.

3
Xman04
Re: Problem editing spotlight display for smartsection
  • 2007/8/22 15:01

  • Xman04

  • Not too shy to talk

  • Posts: 180

  • Since: 2004/7/12


I resolved the poster name and date issue, by adding the following code:

<div class="itemInfo">
      <
span class="itemPoster">
        <
div class="smartsection_item_head_who">
          <{
$item.who_when}> (<{$item.counter}> <{$block.lang_reads}>)
        </
div>
      </
span>
     </
div>


I copied the above code from the smartsection_singleitem_block.html file, and pasted it into the smartsections_item_spot.html file. The code also provides a display of the article read count. I need to format it a little differently, but at least it is capturing some of the information that I need.

However, I still cannot figure out any way of simultaneously displaying the parent category name and subcategory name of an article in the spotlight block of that article. I tried to use some of the breadcrumb code from the header template, since the breadcrumb displays the categories path to the article being displayed (including any subcategories on the path). The breadcrumb feature is capturing and displaying both the category and subcategory names. However, it doesn't work in the spotlight block

This is the format I seek for each article displayed in the spotlight block:

-------------------------------------
Article Title:
Parent Category Name:
Subcategory Name (first level only):
Poster/Date:

Article Summary:

--------------------------------------

Again, I have all of the above working, except for the Parent category Name (all my articles will be located within subcategories of Parent Categories).

I really don't know if it is possible for the spotlight block to display the parent category name of an article, if the article is located in a subcategory of that parent category. It may be outside the scope of how smartsection is designed. However, I really don't know the answer to this, since I'm not too familiar with PHP design.

Login

Who's Online

261 user(s) are online (158 user(s) are browsing Support Forums)


Members: 0


Guests: 261


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits