Does anyone know Greg’s schedule for returning to this forum?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
November 06, 2008 8:33am
Subscribe [2]#16 / Nov 10, 2008 12:49pm
Does anyone know Greg’s schedule for returning to this forum?
#17 / Nov 10, 2008 2:40pm
Hi, internet endeavor. I understand you’re frustrated but it was a weekend, and even we like some time off. =) Greg is back on today and will be here to continue the troubleshooting process with you shortly.
#18 / Nov 10, 2008 3:10pm
Hi Lisa. I don’t use smileys etc., so to clarify the tone of my message - it was not posted in frustration. I assumed Greg was off for the weekend. Didn’t see him posting today and was checking in to see if he might be off longer (noticed he started posting soon after my entry, though). Thanks for the info.
#19 / Nov 10, 2008 3:36pm
hey!
Okay, can you paste the code that you currently have that is properly filtering?
-greg
#20 / Nov 10, 2008 4:00pm
Hi Greg. If I correctly followed your directions, it was to be as simple as can be - and so, here is what it became:
{exp:weblog:categories weblog="weblog" style="linear"}
<li>
{category_name}
</li>
{/exp:weblog:categories}
#21 / Nov 10, 2008 4:13pm
Okay, cool
Let’s try adding some of the embedded variables back in.
{exp:weblog:categories weblog="{embed:the_weblog}" style="linear"}
<li{if segment_3 == category_url_title}class="active_cat"{/if}>
<a href="http://{path=weblog/index}">{category_name}</a>
</li>
{/exp:weblog:categories}Does that work?
#22 / Nov 10, 2008 5:01pm
As is, the block returns nothing - because in
weblog="{embed:the_weblog}"the parameter for the_weblog has not been passed, right?
#23 / Nov 10, 2008 5:06pm
ahh, right. Add that to the embed. 😉
#24 / Nov 10, 2008 5:29pm
I’m not following ...if we’re adding in pieces at a time, what is the_embed at this point? It hasn’t been defined - at this place in the process, how do I add
weblog="{embed:the_weblog}"and have it make sense?
#25 / Nov 10, 2008 7:30pm
okay, sorry.
The goal here is to work backwards into your current template.
So, the weblog categories tag is in an embedded template as per your code example at the top of this post, right?
If so. Let’s get the initial template in there, we will embed the template with exp:weblog:categories, right?
For now, just have the hard coded variables that we did before. if it does what you want to, you have the_weblog being passed to it, right? So add in {embed:the_weblog}, so we can see if that is working. Make sense?
-greg
#26 / Nov 11, 2008 8:20am
Thanks, yes, your explanation does make sense. ...I have added {embed:the_weblog} back into the embedded template and it is working correctly to this point.
#27 / Nov 11, 2008 12:23pm
Boy, this is hard to follow. OK- on the stripped down template that you are embedding you now have:
{exp:weblog:categories weblog="{embed:the_weblog}" style="linear"}
<li{if segment_3 == category_url_title}class="active_cat"{/if}>
<a href="http://{path=weblog/index}">{category_name}</a>
</li>
{/exp:weblog:categories}It’s working- correct? And the template calling the embed is… exactly this?
And at this point- the goal is to get the rest of the ‘bits’ into the test template and keep it working- the ‘full bit’ would look like:
<h3>Weblog Categories</h3>
<p><div class="lcontent"><br />
<ul><br />
{!-- Conditional on the list item applies an active class to the currently viewed category. --}<br />
{exp:weblog:categories weblog="{embed:the_weblog}" style="linear"}<br />
<li {if segment_3==category_url_title}class="active_cat"{/if}><br />
<a href="http://{homepage}/{embed:the_template_group}/category/{category_url_title}/">{category_name}</a><br />
</li><br />
{/exp:weblog:categories}</p>
<p> {!-- This conditional will only show when a category has been selected, and allows a user to return to the default of showing all posts on the weblog --}<br />
{if segment_2=="category"} <br />
<li><a href="http://{homepage}/{embed:the_template_group}/">All News Items</a></li><br />
{/if}<br />
</ul><br />
</div>And forgive if asked and answered and I didn’t spot it re-reading, but is it possible to link to the templates in action?
#28 / Nov 11, 2008 1:19pm
Correct. Link
#29 / Nov 11, 2008 9:51pm
Hey internet endeavor, greetings from a couple hours down I-70 😊
ok. add in your {the_template_group} etc embeds to have the links be what they should be. Then can you post where we are at now?
-greg
#30 / Nov 12, 2008 9:21am
Greetings, neat that you’re so close by! Thanks for your patience. So, adding back in the rest of the embeds I am back to:
{exp:weblog:categories weblog="{embed:the_weblog}" style="linear"}
<li{if segment_3 == category_url_title}class="active_cat"{/if}>
<a href="http://{homepage}/{embed:the_template_group}/category/{category_url_title}/">{category_name}</a>
</li>
{/exp:weblog:categories}...and back to results of no filtering.