Gossamer Forum
Home : Products : Gossamer Links : Discussions :

build without building home.html

Quote Reply
build without building home.html
I'm wondering if there is an easy way to have LSQL NOT build the home.html page. Reason is, we'd like to have it run a series of directories, but not the home page. We'd still like to have the breadcrumbs (title_linked) to reflect index.html, just don't want the system to build an index.html in the main directory.

Does this make sense? How would this work?
Quote Reply
Re: [Evoir] build without building home.html In reply to
hmmm. or, we could just change the title_linked to point to a new home page. I've done some searching... and came up with some global, but it didn't work.

brewt wrote in another topic:
Code:
sub {
my $vars = shift;
my $title_linked = $vars->{title_linked};
$title_linked =~ s|^\s+<[^>]+>|<a href="http://www.ace-installer.com">|;
return $title_linked;
}
as a global, then call this instead of title_linked. but it didn't work. Frown

this approach would work well for me, to be able to call a different page as our home page....

Quote Reply
Re: [Evoir] build without building home.html In reply to
What exactly are you doing? Please go through the steps you are taking. I got this working fine on my site Wink

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: [AndyNewby] build without building home.html In reply to
Thanks Andy,

I created a global called "breadcrumb". In that global, I put the following code:
Code:
sub {
my $vars = shift;
my $title_linked = $vars->{title_linked};
$title_linked =~ s|^\s+<[^>]+>|<a href="http://www.mydomain.com">|;
return $title_linked;
}

where it says mydomain.com, I put my domain.

I then went to category.html template, and replaced the <%title_linked%> with <$breadcrumb%>.

I built all, and went to my static pages.
instead of title_linked, I now see the following code:
Code:
sub { my $vars = shift; my $title_linked = $vars->{title_linked}; $title_linked =~ s|^\s+<[^>]+>||; return $title_linked; }

That code appears on the html pages that LSQL generated.

Perhaps I have the global set wrong?

Last edited by:

Evoir: Dec 11, 2001, 2:05 PM
Quote Reply
Re: [Evoir] build without building home.html In reply to
Make sure your global starts with sub {, and does not have any leading spaces or any other characters. If it does, it won't get treated as code, but rather as HTML.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] build without building home.html In reply to
it works now Smile

odd thing is, there weren't any spaces or anything, I just rebuilt, and it worked.

Thanks for your help on this. I will submit to the resources section. Cool

Quote Reply
Re: [Alex] build without building home.html In reply to
Alex,

So, it seems that using this global is not the best approach. It does nothing for fixing up the search_results. The breadcrumbs lead back to the LSQL build home.html page.

I think it would be soo cool if you all gave us a defineable home page. It could be in the "setup" panel of the admin, it would ask us if we wanted LSQL to build a home page, and if not, where did we want to point folks to as the home page.

In the meantime,

1) how can I get the search_results.html template to sho the corrected home page when showing the breadcrumbs?

2) Is there anywhere else that points to home.html page that I am not thinking of?

3) how can I control the font size and color of the search_results categories and links. I don't see what defines these. Angelic

Last edited by:

Evoir: Dec 12, 2001, 11:59 PM
Quote Reply
Re: [Evoir] build without building home.html In reply to
There is a logical problem with this.

The "home page" is the "root" node. With Links being a hierarchical system, if you don't have a root node, what you have is orphaned sub-trees.

In essence, you'd be building a new directory for each of the "top level" categories.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] build without building home.html In reply to
Hey pugdog,

I don't understand. I'd simply like to be able to define a different page (in a different directory) and call that home, and have LSQL tell itself that this new page is always home, even if it is in a new directory. This global works for the title_linked stuff, but not in the search results.

This way, I can have LSQL work to create all the directories I want, but I have more (complete autonimous) control over the home page.

But most of all, I'd like to find a way to have the serach results page show the corrected (changed) new homepage, like this global did for the title_linked. This works beautifully. I just need this to work for every instance of pointing poeple to the home page.

Quote Reply
Re: [Evoir] build without building home.html In reply to
Hi Evoir,

what about doing this by just modifying the templates?
You just need to add a link to your main homepage right before <%title_linked%> in every affected template (e.g. search*.html) and define the global 'site_title' according to what you call the LSQL section of your site (e.g. 'Links' or 'Stories').
The navigation should look like "Home/Stories/..." after that and clicking on "home" should bring the user to your main homepage.


Andreas
-------------------------------------------------
http://www.archaeologie-online.de
Quote Reply
Re: [Digger] build without building home.html In reply to
I'm sorry, I may not have been totally clear. I was able to change the title_linked tag by using a global and replacing the tag <%title_linked%> with <%breadcrumb%> (my new global. This works great on all pages.

But, I found that my search results page, there is a tag that calls a breadcrumb like navigation for each link, telling the searcher in what category a link lives. I believe it is called <%category_results%> or <%link_results%>.

These still link the "wrong" homepage, the LSQL homepage, which I'd like to NOT use.

Does this help explain?

Quote Reply
Re: [Evoir] build without building home.html In reply to
Hi,

Rather than trying to get LinksSQL to link to your home page, why not have the LinksSQL home page BE your home page?

I did this using RewriteRules.

Anyone accessing http://mydomain.com is (transparently) taken to http://mydomain.com/dir (my Links build directory). Thus, both URLs are the same page.

I have a couple of threads dealing with this issue I believe... here is one. You also might try searching for "RewriteRule" in this forum...

Smile

--
Matt G
Quote Reply
Re: [Matt Glaspie] build without building home.html In reply to
Thanks Matt,

I'll look into. I may not get to try it for a week or so. But any other ideas are welcome as well. I'll let you all know what I came up with.

I just wish there were a variable in the "setup", allowing me to point folks towards a new/different homepage than what LSQL builds ..... (dreaming) ahhh.

Quote Reply
Re: [Evoir] build without building home.html In reply to
In Reply To:
I just wish there were a variable in the "setup", allowing me to point folks towards a new/different homepage than what LSQL builds ..... (dreaming) ahhh.

That would be nice, but using a RewriteRule solution allows your site home page to use LinksSQL tags and globals... a substantial benefit IMO.

--
Matt G
Quote Reply
Re: [Matt Glaspie] build without building home.html In reply to
>>That would be nice, but using a RewriteRule solution allows your site home page to use LinksSQL tags and globals... a substantial benefit IMO.
<<

You don't need a re-write if you build your directory in your html root.
Quote Reply
Re: [PaulW] build without building home.html In reply to
nah. I really want the homepage to be seperate. I'd like to be able to call things from LSQL, but I also have a few other things going on the homepage (like a poll, for example).

I would prefer to hand code my homepage and not have LSQL build it for me. (Unless I am missing something here).

Quote Reply
Re: [Evoir] build without building home.html In reply to
In Reply To:
I would prefer to hand code my homepage and not have LSQL build it for me. (Unless I am missing something here).

You can hand code it if you want and just save the file as home.html in your templates directory. You're not obligated to put any LinksSQL tags on your page... but the point is, you CAN! In other words, making it part of LinksSQL does not prevent you from putting whatever you want on your page, it only gives you more flexibility.

Also, for a LinksSQL poll system, this thread may be useful for ideas.

And Paul, I was not aware that assigning the build directory to html root was feasible. In fact, I think I read somewhere here a few months ago where someone was trying to do that and was having some sort of difficutlies getting everything to work right... I could be mistaken though, I don't remember the specifics.

--
Matt G
Quote Reply
Re: [Matt Glaspie] build without building home.html In reply to
I think I may have meant html root in a different sense to what you are thinking maybe?

I mean your lowest level directory in which you can store html.

I do this with Links SQL and Links2 so when you rebuild it updates your home page at www.domain.com
Quote Reply
Re: [PaulW] build without building home.html In reply to
In Reply To:
I think I may have meant html root in a different sense to what you are thinking maybe?
No, we meant the same thing, I just thought I remembered something I apparently didn't. Blush

And Evoir, you also might find this thread helpful, as it contains a couple more options.

--
Matt G
Quote Reply
Re: [Matt Glaspie] build without building home.html In reply to
I have another idea based on your suggestions Matt: what about using .htaccess to make any call to the LSQL directory root point to my existing homepage? (sorta backwards from what you were doing). Does this make sense? Does this kind of redirect cause starin on a server? (I am on a shared server and have a lot of traffic for a shared server - like 3 million hits a month)

Last edited by:

Evoir: Mar 4, 2002, 10:55 AM