PDA

View Full Version : How to erase site name only from index page?


milar
04-11-2006, 04:29 PM
thank.

anon
04-11-2006, 04:43 PM
{if $category.ID gt 0}
code to show name here
{/if}

milar
04-11-2006, 05:33 PM
put in wich file?

Optimit
04-11-2006, 06:35 PM
Its the h1 tagged code in the header.tpl file

wtms
04-29-2006, 03:19 AM
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!

Neticus
04-29-2006, 03:44 AM
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}

wtms
04-29-2006, 03:53 AM
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?

Neticus
04-29-2006, 05:34 AM
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:

Content visible to registered users only.

The above is just a suggestion, somebody else may have a better tactic, at least you have one more option then before :)
.

Neticus
04-29-2006, 05:03 PM
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.

thompson
04-29-2006, 06:09 PM
good work. thanks.

wtms
04-29-2006, 06:10 PM
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

anon
04-29-2006, 07:34 PM
Content visible to registered users only.

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