I'm a bit confused.
Should the "Featured" block display a list of stories (depending on how many are "featured", of course) similar to the 'Most Recent' or 'Random', or should it display a link to a featured stories page?
Using this:
<div class="block">
<div class="tl"><div class="tr">
<div class="title">Featured Story</div>
<div class="content">{featured}</div>
</div></div></div>
I get a titled box with a link to a 'Featured stories' page. What I'm trying to achieve is a list, like "Recent". I'm assuming that if it's supposed to be a list, I've made a coding error.
Could someone point me in the right direction please?
Version: 3.3
URL Pathfinder
Skin: slightly modified "Elegance"
(My apologies if this should've been under "Skinning" but I thought it may've been a more general thing)
If you go to admin -> blocks -> featured, and click "options", is it set for defaut, or "use .tpl"? I'm really no pro with coding or anything like that, but I read your post and changed mine to "use .tpl" and got a bunch of errors..so I put it back on Default, and my "featured" block is functioning exactly how you want yours to.
Again, sorry if I'm no help π
Thanks for the suggestion...using the tpl thing didn't make any difference (but nothing broke either). All the other blocks I'm using are set to "default" so I went with that.
I think I must've made some coding error or something. There's definitely something I'm not doing right.
Haha, oh...Well, sorry I couldn't be of more help to you. π
The featured block works like the other blocks in default mode. You've got 2 variables to use in your .tpl {featured_title} and {featured_content}. If you set it to use .tpl you create a block inside the .tpl called featuredblock. It'll look something like this:
<!-- START BLOCK : featuredblock -->
<div class="listbox">
<div class="recenttitle">{title} {score} {new}</div>
<div class="author">by {author}</div>
<div class="dateinfo">
<span class="label">Published:</span> {published} <span class="label">Updated:</span> {updated}
<span class="label">Rated:</span> {rating} {roundrobin} [{reviews} - {numreviews}] {last_read}
<br />{addtofaves} {tracker} {featuredstory}</div>
<div class="content">
{summary}<br />
<a href=""javascript:more_info('story{sid}')"" id="more_story{sid}" class="infolinks">More info...</a>
<div id="info_story{sid}" style='display: none; margin-top: 1em;'>
<span class="label">Categories:</span> {category} <br />
<span class="label">Characters: </span> {characters}<br />
{classifications}
<span class="label">Series:</span> {serieslinks}<br />
<span class="label">Chapters: </span> {numchapters} {toc}<br />
<span class="label">Completed:</span> {completed}
<span class="label">Word count:</span> {wordcount} <span class="label">Read Count:</span> {count}
<a href=""javascript:more_info('story{sid}')"" id="hide_story{sid}" class="infolinks">Hide info...</a>
</div>
</div>
</div>
<!-- END BLOCK : featuredblock -->
Thanks Tammy, but I couldn't get it to work. I tried a complete copy & paste of your code to my index.tpl but it stripped the whole lot out (well, at least nothing appeared on the main page and view source didn't see it).
Then I tried various combinations of your code, but nothing showed up.
Then I tried this:
<div class="block">
<div class="tl"><div class="tr">
<div class="title">Featured Story</div>
<div class="content">{featured_title}<br />
{featured_content}
</div>
</div></div></div>
and at least the box appeared but it had no links etc or text inside it at all.
I've returned it to my above attempt (as the site is being used now and I don't want to completely freak out anyone).
This is your featured block, from your index.tpl
<div class="block">
<div class="tl"><div class="tr">
<div class="title">Featured Story</div>
<div class="content">{featured}</div>
</div></div></div>
Change it to:
<div class="block">
<div class="tl"><div class="tr">
<div class="title">{featured_title}</div>
<div class="content">{featured_content}</div>
</div></div></div>
Then go to admin>blocks>featured and make sure the option "default" is selected as the format. If you have a variables.php file, remove any mention of the featured block.
Carissa, you're a genius! Many thanks.
I made both changes you suggested (the code and the variables file) and it now works like a dream.
Thank you Carissa, Tammy and MySQLueless for you help.
