Gossamer Forum
Home : Products : Gossamer Links : Discussions :

include_header doesn't work as expected

Quote Reply
include_header doesn't work as expected
hi

I have used the following code to enable these 2 links to appear on the web page in the menu bar after an Editor logs on. It works :-)

<%if Links::Utils::is_editor%><li><a href="<%config.build_root_url%>/Public_Blogs/<%category_name%>/index.html">My Public Blog</a></li><%endif%>
<%if Links::Utils::is_editor%><li><a href="<%config.db_cgi_url%>/browser.cgi">My Private Folder</a></li><%endif%>

But the problem is that when the editor clicks to another page. One that also includes the include_header snippet then these 2 links do NOT appear. :-(

Is there a way I can fix this so that once the Editor has signed in then any page they go to that has the include_header snippet i.e.

<%include include_header.html%>

- then these 2 links STILL still appear in the menu bar?

Please ask if I haven't made this clear. I am a newbie so any answer has to be quite simple ;-) Thanks.

Steve
Quote Reply
Re: [cuppa] include_header doesn't work as expected In reply to
Steve, just to check - is this site running in dynamic mode?
Quote Reply
Re: [aus_dave] include_header doesn't work as expected In reply to
Thanks Aus_Dave!

I see what you are getting at :-) If I click the link "dynamic" in the Admin Panel then when the Home page opens in a new window and I log on, then everything works just like i was wanting it too (see my post at the top of this page). All the URLs are in 'dynamic' mode too.

But here's the part i don't understand. As my visitors would arrive at the home page - which ends in >index.html - then when a user signs in - all the pages are static (i.e. not those dynamic URLs). How can I fix it so people arrive at a dynamic version of the web site?

I have read the links SQL manual and gone into Admin and selected "yes' for 'dynamic_pages' under Page Display and Sorting Options. Also "dynamic_preserve" shows > t,d,s

So my question is how can I fix it so people arrive at a dynamic version of the web site? And also that it stays in 'dynamic' mode?

Thanks!
Steve
Quote Reply
Re: [cuppa] include_header doesn't work as expected In reply to
Hi,

Simple answer: mod_rewrite Smile

This will give the illustion of a static site, but it will in fact we run dynamically, via page.cgi. If doing this, I'd recommend using mod_perl too, as this will improve performance of the site.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] include_header doesn't work as expected In reply to
hello again Andy

You certainly are a big helper round here. Thanks.

My problem is that I have no idea what you mean by

- mod_rewrite
-
mod_perl

Would suggest I do a search of the forum to pick up the knowledge or is there an easy explanation?

Thanks
Steve


Quote Reply
Re: [cuppa] include_header doesn't work as expected In reply to
Steve, there are lots of threads here about mod_rewrite. This one has a lot of information in it for different configurations of Links but there are plenty of others:

http://www.gossamer-threads.com/...orum.cgi?post=224690

Essentially you will need a global to rewrite the URLs within Links templates etc., and mod_rewrite rules within the directories you are rewriting URLs to.

So if you want a dynamic URL to look like domain.com/articles/article-L1.html then you need to create a directory called articles in your root directory, and then put a rewrite rule in an .htaccess file inside it.

There is a free detail_page plugin from pugdog that is in the plugin download area, it is worth getting that as it will allow you to do what I outlined above very easily.

Mod_perl is less important for this but if you are interested here is some background reading.

Good luck Wink.


PS Someone from GT needs to look at the default styles for this forum - inline links are practically invisible!

Last edited by:

aus_dave: Oct 26, 2005, 5:25 PM