On Wed, Jun 22, 2011 at 2:33 PM, Herman Schistad
wrote:
> On Wed, Jun 22, 2011 at 15:24, Cal Leeming [Simplicity Media Ltd]
> wrote:
> > We have actually just implemented this on one of our other sites still in
> > development. The
On Wed, Jun 22, 2011 at 15:24, Cal Leeming [Simplicity Media Ltd]
wrote:
> We have actually just implemented this on one of our other sites still in
> development. The problem with keyword highlighting is you have to be careful
> not to enter into infinite
Hi Herman,
We have actually just implemented this on one of our other sites still in
development. The problem with keyword highlighting is you have to be careful
not to enter into infinite loops, by ensuring you only match keywords
outside of existing HTML tags. Normally I'd just say "figure it
Shouldn't be too hard to implement I don't think. Basically just loop
through your list of keywords and replace them with a link. Something like
this:
def make_keyword_links(content):
for keyword in Keyword.objects.all():
content = content.replace(keyword.text, keyword.link)
Hi there fellow developers.
I'm wondering if anyone has seen an app which does the following:
* Finds keywords in the templates, which is defined by the user and
then creates internal links to these.
Use-case:
1. I create keyword: "Cupcakes" and give it the href/URL property:
/info/cupcakes/ in
5 matches
Mail list logo