named anchor? link content of different blocks?
named anchor? link content of different blocks?
How do I make 'named anchor'?
For instance I have my search form in the {HEADER},
but I want my search results to be shown in {CONTENT}?
And can I only use {HEADER}, {CONTENT}, {FOOTER}, {RIGHT} and {LEFT} or are there more than 5 block you can define?
Robert [TI&OSM]
For instance I have my search form in the {HEADER},
but I want my search results to be shown in {CONTENT}?
And can I only use {HEADER}, {CONTENT}, {FOOTER}, {RIGHT} and {LEFT} or are there more than 5 block you can define?
Robert [TI&OSM]
Thanks Claus, I like it when things are easy…!
Do you also have the answer on my other question…
Thanks on forehand,
Robert [TI&OSM]
Do you also have the answer on my other question…
It would be really nice, because it makes phpwcms a lot more flexible.How do I make 'named anchor'?
For instance I have my search form in the {HEADER},
but I want my search results to be shown in {CONTENT}?
Thanks on forehand,
Robert [TI&OSM]
Hi,
seems to be two questions. Regarding 'anchors' more information might follow...
For search forms you don't need anchors.
1) Make a new article with contenpart 'search form'
this will be even the page where all the results are listed.
so you rather place it in {CONTENT} or some of your main blocks.
2) check source code of page and copy the form code snippet.
3) paste the snippet to your templates where ever you want.
source code looks like
search_input_field don't change the input variables!!!
groetjes n greetz
seems to be two questions. Regarding 'anchors' more information might follow...
For search forms you don't need anchors.
1) Make a new article with contenpart 'search form'
this will be even the page where all the results are listed.
so you rather place it in {CONTENT} or some of your main blocks.
2) check source code of page and copy the form code snippet.
3) paste the snippet to your templates where ever you want.
source code looks like
*index.php?id=0,12,0,0,1,0 or something...<form name="search" id="search" action="LINK_TO_YOUR_SEARCH_PAGE (step 1)*" method="post">
<input type="text" name="search_input_field" id="search_input_field" value="Search" />
</form>
search_input_field don't change the input variables!!!
groetjes n greetz
Last edited by Jensensen on Thu 2. Oct 2008, 22:00, edited 1 time in total.
Hello Jensensen,
Thanks for your input, it works great! Many thanks…
Yet, another question…
The search results do not have a empty line between them.
The come in a 'div', but I don't know where I can define that 'div'.
It's not the 'search_results div', it's nested in that one.
Further you can 'mark' the word you are looking after,
it is defined standard with 'em' and you can add other definitions to it,
but you can't get rid of the 'em' and that's what I do want!
Can you Jensensen or anybody help me with this?
Many thanks in advance,
Robert [TI&OSM]
Thanks for your input, it works great! Many thanks…
Yet, another question…
The search results do not have a empty line between them.
The come in a 'div', but I don't know where I can define that 'div'.
It's not the 'search_results div', it's nested in that one.
Further you can 'mark' the word you are looking after,
it is defined standard with 'em' and you can add other definitions to it,
but you can't get rid of the 'em' and that's what I do want!
Can you Jensensen or anybody help me with this?
Many thanks in advance,
Robert [TI&OSM]
Hi Robert,
to modify this special <div>-tag you will need to patch some file!! so be careful, even when updating to newer versions!!!
open [v.1.3.3]:
/include/inc_front/content/cnt13.article.inc.php
line 268
and add a CSS class e.g.
$s_result_list .= '<div class="MySpecialResultClass">'.LF;
btw, its worth to have a look for the following lines, too.
don't forget to add this class in your frontend.css!
this is, you should do to modify the <em> tag within your search results --->
.phpwcmsSearchResult em.highlight, em.highlight {
background-color: #FFFF00;
font-style:inherit;
}
remember that <em>, like <strong>, <h1> for example, is one of the most "preferred" spidering index tag for google and others.
greetz
to modify this special <div>-tag you will need to patch some file!! so be careful, even when updating to newer versions!!!
open [v.1.3.3]:
/include/inc_front/content/cnt13.article.inc.php
line 268
Code: Select all
$s_result_list .= '<div>'.LF;
$s_result_list .= '<div class="MySpecialResultClass">'.LF;
btw, its worth to have a look for the following lines, too.
don't forget to add this class in your frontend.css!
this is, you should do to modify the <em> tag within your search results --->
.phpwcmsSearchResult em.highlight, em.highlight {
background-color: #FFFF00;
font-style:inherit;
}
remember that <em>, like <strong>, <h1> for example, is one of the most "preferred" spidering index tag for google and others.

greetz
Hello 'Jensensen',
Many, many thanks…!
I always wonder, how do people like you know these kind of things?!?!
Anyway, I'm glad there are people like you.
So, if I understand it well, I can change other things in all the other 'cnt**.article.inc.php', that means when I'm ready for it, technically speaking.
Many thanks again, Robert
Many, many thanks…!
I always wonder, how do people like you know these kind of things?!?!
Anyway, I'm glad there are people like you.
So, if I understand it well, I can change other things in all the other 'cnt**.article.inc.php', that means when I'm ready for it, technically speaking.
Many thanks again, Robert
Hi Robert,TI&OSM wrote:...So, if I understand it well, I can change other things in all the other 'cnt**.article.inc.php', that means when I'm ready for it, technically speaking...
well, indeed, yes you can, but you should better DO NOT TOUCH these files, as they are the "heart" of "our" numerously well-loved phpwcms. USUALLY there is even NO NEED to change this files. Also to do patches that way will result in MUCH MORE DIFFICULTIES, when doing updates and may run into profoundly malfunctions!!!
Otherwise it IS really worth to have a closer look to this files and somehow exciting to me. As I mentioned, this are the major program files with all the routines and stuff like that. So reading code means to learn, how the things work together hand in hand and what happens in the background. In short: to know better how phpwcms is working --> to get creativity out of the brain straight to backend and then, finally, most impressively presented in front to the public.
Greetz and happy coding
Last edited by Jensensen on Tue 22. May 2007, 00:49, edited 1 time in total.
as you all can see, sometimes the things are much easier!
a little bit more effort is necessary to edit pages but a very elegant solution, pico, i didn't think about
but you will have to keep CPs in order carefully!!!!
can be very helpful i guess.
but wait, doing it this way, you have NO possibility to adjust distances (margin, padding) BETWEEN search results, isn't it?

a little bit more effort is necessary to edit pages but a very elegant solution, pico, i didn't think about

but you will have to keep CPs in order carefully!!!!
can be very helpful i guess.
but wait, doing it this way, you have NO possibility to adjust distances (margin, padding) BETWEEN search results, isn't it?
greetzTI&OSM wrote:Yet, another question…
The search results do not have a empty line between them.
The come in a 'div', but I don't know where I can define that 'div'.
It's not the 'search_results div', it's nested in that one.
by a little thinking and knowing how Cascading-Style-Sheets are working this is possible too
you can define Classes for every Tag in a Container
as Example
you have wrapped the Search CP into a Class named 'mySearch'
so when you take a look to the generated HTML-Sourcecode you will find something like this
so you can build Classes like:
.mySearch p{
font-size:18px;
background:#edcaef;
}
.mySearch a{
font-size:12px;
background:#00ff00;
}
.mySearch a:hover{
....
}
think about Parents and Childs
you can define Classes for every Tag in a Container
as Example
you have wrapped the Search CP into a Class named 'mySearch'
so when you take a look to the generated HTML-Sourcecode you will find something like this
Code: Select all
<div class="mySearch">
<div>
<h3><a href="index.php?id=100,53,0,0,1,0&highlight=test">Tool Tip</a></h3>
<p>and Info Pop-Up This is a short Sample how Tooltip works. - in AdminSection goto 'Keyword' and enter your Keywords for a Glossary - create a hidden Si<em class="highlight">test</em>ructure you call Keyword (for example) and with…</p>
</div>
</div>
.mySearch p{
font-size:18px;
background:#edcaef;
}
.mySearch a{
font-size:12px;
background:#00ff00;
}
.mySearch a:hover{
....
}
think about Parents and Childs

Hi pico,
you're RIGHT!
Thanks!
So, always check output, code first - then adjust CSS.
Additionally, to solve Rob's prob in this case, you can CSS the following:
.mySearch div {
padding-bottom: XYpx;
margin: Xpx 0 Yem 0;
}
.mySearch h3 {
your: style;
}
.mySearch h3 a {
your: style;
}
.mySearch h3 a:hover {
your: style;
}
.mySearch p {
your: style;
}
.mySearch p em {
your: style;
}
.mySearch p em.higlight {
your: style;
}
greetz
you're RIGHT!
Thanks!
So, always check output, code first - then adjust CSS.
Additionally, to solve Rob's prob in this case, you can CSS the following:
.mySearch div {
padding-bottom: XYpx;
margin: Xpx 0 Yem 0;
}
.mySearch h3 {
your: style;
}
.mySearch h3 a {
your: style;
}
.mySearch h3 a:hover {
your: style;
}
.mySearch p {
your: style;
}
.mySearch p em {
your: style;
}
.mySearch p em.higlight {
your: style;
}
greetz
Re: named anchor? link content of different blocks?
Hi Jensensen,
Thanks for this piece... however I am having a little trouble using.
I appear to have it set up ok but my results appear with another search box above.
How do get rid of that? - I am using a 'search' content part in my article - should I use something another CP?
many thanks,
paul
Thanks for this piece... however I am having a little trouble using.
I appear to have it set up ok but my results appear with another search box above.
How do get rid of that? - I am using a 'search' content part in my article - should I use something another CP?
many thanks,
paul
Re: named anchor? link content of different blocks?
depends on what you want? don't know, can't see...
Think about your templates to use it (whenever possible!) with a certain CP. Add/edit your HTML and then add CSS as needed.
Think about your templates to use it (whenever possible!) with a certain CP. Add/edit your HTML and then add CSS as needed.