averyvery / Freebie

EE 2.0 extension for ignoring specific segments when routing
57 stars 8 forks source link

Using Freebie Segments and Break Segments #2

Closed ghost closed 14 years ago

ghost commented 14 years ago

Hi Doug,

I'm not sure if this is an issue or a feature request! :)

In Structure, I have this page: /blog/tags/, which outputs a list of all the tags used in a blog.

I've created a breaking segment of tags as I want to use segment 3 in order to load a page of entries that contain that tag.

So /blog/tags/flowers/ should load a page with a list of entries that have a tag of flowers. This works fine on its own and is the point at which I tweeted a thanks to you earlier, as it wasn't working in an older version (maybe 2-3 versions back) of Freebie! :)

But I'm having problems when I want to use a single template to output one piece of content to /blog/tags/ and another piece of content to /blog/tags/flowers/, using conditionals. Further investigation has shown me why (I think).

On this page: /blog/tags/

The following code:

Segment 2: {segment_2}
Segment 3: {segment_3}
Freebie 2: {freebie_2}
Freebie 3: {freebie_3}

Outputs this:

Segment 2: tags Segment 3: Freebie 2: tags Freebie 3: {freebie_3}

Should, or could the Freebie 3 segment above get outputted as a blank value at all, instead of {freebie_3}? If so, it'd certainly help me in this situation as I want to display content based on {if "{freebie_3}" == ""}Show this{/if}.

For information, on this page: /blog/tags/flowers/, the same code above outputs the following:

Segment 2: tags Segment 3: Freebie 2: tags Freebie 3: flowers

which is exactly as I was expecting.

I hope this makes sense, and sorry if I'm going around the block to explain something or missing something.

Thanks,

Stephen

averyvery commented 14 years ago

Looks like you helped catch two bugs on this one:

Both these fixes are in now! The new version should solve your problem. In the future, you should also see Freebie updates in the NSM Addon Updater, so you won't need to check back to find out about new version. Thanks for the help in tracking this one down; let me know if you have any issues with it!

-Doug

ghost commented 14 years ago

Hi Doug,

No worries, and thanks for spotting and fixing it (two for the price of one eh!). ;-)

Just installed the latest version and that now works great, thanks.

I'm not currently using NSM Addon Updater, but I did spot the new RSS folder (though I just ignored it). If I use NSM Addon Updater in the future, do I need to save that RSS folder within the Freebie folder?

Thanks,

Stephen

averyvery commented 14 years ago

Nope, that folder's just to help me easily update an RSS feed for the updater - feel free to ignore it. I'll put a note in the readme about it.