Go Back   PHP Link Directory Forum > PHP Link Directory (phpLD) > Design

Design Discuss ways to change the layout and CSS to fit your site.

Closed Thread
 
Thread Tools Display Modes
Old 04-11-2006   #1
milar
 
Join Date: Apr 2006
Posts: 2
Default How to erase site name only from index page?

thank.
milar is offline  
Old 04-11-2006   #2
anon
Supporter
 
anon's Avatar
 
Join Date: Feb 2006
Location: As far from you as humanly possible!
Posts: 2,893
Send a message via Yahoo to anon
Default

{if $category.ID gt 0}
code to show name here
{/if}
anon is offline  
Old 04-11-2006   #3
milar
 
Join Date: Apr 2006
Posts: 2
Default

put in wich file?
milar is offline  
Old 04-11-2006   #4
Optimit
Supporter
 
Join Date: Dec 2005
Posts: 1,247
Default

Its the h1 tagged code in the header.tpl file
Optimit is offline  
Old 04-29-2006   #5
wtms
Supporter
 
Join Date: Mar 2006
Location: East Coast
Posts: 78
Send a message via Yahoo to wtms Send a message via Skype™ to wtms
Default

I played around with this code but can't get desired results.
I want this element : <h1 id="title">{$in_page_title.....}</h1> to remain on all pages except index and to be completely removed from the index page.
If I understand correctly something should be placed inside {if...} tag to identify index page. Something like:
{if (this is not index page)}<h1 id="title">{$in_page_title.....}</h1>{/if}

How to write red statement in the smarty code?

Thanks!

Last edited by David; 08-19-2009 at 12:12 AM.
wtms is offline  
Old 04-29-2006   #6
Neticus
Supporter
 
Neticus's Avatar
 
Join Date: Dec 2005
Posts: 487
Default

In header.tpl, code will look something like this if using v304, or similar if another version:

{if $category.ID gt 0}
<h1 id="title">{$in_page_title|escape|trim}</h1>
{/if}
Neticus is offline  
Old 04-29-2006   #7
wtms
Supporter
 
Join Date: Mar 2006
Location: East Coast
Posts: 78
Send a message via Yahoo to wtms Send a message via Skype™ to wtms
Default

This way it will also remove title from "Submit Link", "Latest Links", "Top Hits" and "Search Result" pages...

Is there a way to keep the title on those pages and remove it only from index?

Last edited by David; 08-19-2009 at 12:12 AM.
wtms is offline  
Old 04-29-2006   #8
Neticus
Supporter
 
Neticus's Avatar
 
Join Date: Dec 2005
Posts: 487
Default

ahhh now I remember why that way was a no no.

Unfortunately I know of no way to isolate using the code above without disenfranchising the submit, latest and top hits pages.
Maybe someone else can offer a new thought.

You could perhaps try a sneek attack by going via the database:

1) Access your phpld database using perhaps phpmyadmin select/browse PLD_CONFIG edit SITE_NAME delete 'your site name'
This will also delete it from the section asking you to specify it in admin. And thus delete it from the area you wish on the
index page.

However this will also remove the 'site title' from the breadcrumb in the top bar. (site title>category)

2) You can patch this side effect by going into topbar.tpl and literally replacing {$cat.TITLE|escape} with 'DIRECTORY NAME'.

Code in topbar.tpl with {$cat.TITLE|escape)replaced by Directory Name:

Code:
   {* Display current path *}
   {assign var="current_path" value=""}
   {foreach from=$path item=cat name=path}
      {assign var="current_path" value="`$current_path``$cat.TITLE_URL`/"}
      {if !$smarty.foreach.path.first} &raquo; {/if}
      {if !$smarty.foreach.path.last}
         {if $smarty.const.ENABLE_REWRITE}{$current_path}{else}index.php?c={$cat.ID}{/if}DIRECTORY NAME
      {else}
         {$cat.TITLE|escape}
      {/if}
   {/foreach}
</div>
The above is just a suggestion, somebody else may have a better tactic, at least you have one more option then before
.

Last edited by David; 08-19-2009 at 12:12 AM.
Neticus is offline  
Old 04-29-2006   #9
Neticus
Supporter
 
Neticus's Avatar
 
Join Date: Dec 2005
Posts: 487
Default

Ok another way without tampering with database:


1. In header.tpl template do like was first suggested:

{if $category.ID gt 0}
<h1 id="title">{$in_page_title|escape|trim}</h1>
{/if}

2. Then place this right above the above code:

{if $list or $search} for v2 to v303 use: {if $p or $q}
<h1 id="title">{$in_page_title|escape|trim}</h1>
{/if}

This will reinstate "Latest Links", "Top Hits" and "Search Result"


3. In submit.tpl place above {include file="top_bar.tpl"}

<h1 id="title">{$in_page_title|escape|trim}</h1>
Submit a new link to the directory

This will reinstate the "Submit Link" page title


4. To avoid description duplication, delete 'Submit a new link to the directory' at top where you find:
{capture assign="description"}{l} Submit a new link to the directory {/l}{/capture}


How can such a simple request try Pharaoh's patience so.

laters.
Neticus is offline  
Old 04-29-2006   #10
thompson
Supporter
 
Join Date: Oct 2005
Posts: 548
Default

good work. thanks.
__________________
many thanks.

thompson.
thompson is offline  
Old 04-29-2006   #11
wtms
Supporter
 
Join Date: Mar 2006
Location: East Coast
Posts: 78
Send a message via Yahoo to wtms Send a message via Skype™ to wtms
Default

Thanks, Net

This should do it. I would prefer not to change any sourse code outside template files.

I am working on a new template for 3.0.4. so you can't ask people to edit database just to install the skin
wtms is offline  
Old 04-29-2006   #12
anon
Supporter
 
anon's Avatar
 
Join Date: Feb 2006
Location: As far from you as humanly possible!
Posts: 2,893
Send a message via Yahoo to anon
Default

Quote:
Originally Posted by wtms
Thanks, Net

This should do it. I would prefer not to change any sourse code outside template files.

I am working on a new template for 3.0.4. so you can't ask people to edit database just to install the skin
Note* when creating a 'template', you need to know how, and be able to code accordingly for your template. Seeing as you were having problems, i'd be pretty tentative in using one of your templates. but to each his own i guess.

Rob
anon is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:44 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.